管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
$ Y& z( \" U; P4 T8 }4 Q+ V' u1 ?! i$ e8 G9 k) M6 h
$opts = array (* `& \& {0 ]# d2 ]
'http' => array (0 Q- {" w' c; @, i4 O
'method' => 'POST',0 w0 f& H8 }+ m% A; I# Y
'header'=> "Content-type: application/x-www-form-urlencodedrn",/ ?5 O8 D( |: ]4 y. n& N- {: M
"Content-Length: " . strlen($data) . "rn",0 }0 B4 E; G7 Z. L. z
'content' => $postdata
/ y ?# D/ P8 N )# C4 T5 \3 L; w1 ?' e8 s# e
);
$ { G2 @" W/ o0 q- B' M
% l5 j& L1 D4 s, r7 b: F $context = stream_context_create($opts);
$ z& N0 _# L! _1 W& Y4 ~/ T $html = file_get_contents($url, false, $context); 6 V; X' G) w) V$ }
0 [- d9 T3 K6 b8 e* F3 _& b9 ?% V. W
|
|