管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
, d/ S( w7 L0 O* z# z( p }4 @; e8 a; k2 M8 K
$opts = array (
: e3 X G5 j0 X% y3 J7 m; G. t2 Z 'http' => array (
7 `5 ~, p% H9 V( {3 E; w$ {- q 'method' => 'POST',
2 q3 y6 P9 W0 j 'header'=> "Content-type: application/x-www-form-urlencodedrn"," ?0 r4 I8 o7 O. g8 ]2 w3 V
"Content-Length: " . strlen($data) . "rn",
1 E( W: v) S9 I8 Q/ m 'content' => $postdata
9 [: Z; a* V# d) G% V ). J. c% |# M! ^" \* q
); e' E0 ^/ d5 |, M7 m- x9 m8 b7 | T
# W' k5 m. g- E
$context = stream_context_create($opts);
$ Y" ~& J( ~+ l/ S1 p# m5 i $html = file_get_contents($url, false, $context);
9 ~% x5 D" {7 s d+ r3 r1 x& s: t8 b/ D5 L) M
|
|