管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
1 w3 n) i7 ]# z$ m9 L
9 [9 r0 `+ o2 K) r0 T& i+ k $opts = array (
& Z* E' x8 d5 u. Z( [; v 'http' => array (9 c2 w, e( h! Q% h
'method' => 'POST'," F7 I6 k: Z* N1 i& ?2 i' Y4 R) P
'header'=> "Content-type: application/x-www-form-urlencodedrn",
; X6 P" O8 M8 w, c; o! d9 b& J0 x "Content-Length: " . strlen($data) . "rn",
2 @* O' Y d2 a1 ~1 H% ?) n 'content' => $postdata# E/ d/ r! Z3 M: E& e# Y
)
& D9 I9 w( Z# s! m$ [& N3 X );
) ^! V" \( x: ^1 J. T9 c2 Q- W9 q9 w
2 Q# g( O* m: X; v: X $context = stream_context_create($opts);- l9 h+ R8 E# a/ k
$html = file_get_contents($url, false, $context); - m# R$ M1 |' D+ |
: \5 h. v W7 s1 \1 `
|
|