管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
- t# @' f8 I+ k# N( Q; o% \* e0 W0 n# m/ |: A: U6 h' h, y. }* Z
$opts = array (
& g2 k; ^9 V# l* H- f) P/ k. V 'http' => array (7 F* Z/ c! c' S9 p3 L2 d# ]
'method' => 'POST',, x! d5 W& O: K9 U* W$ D
'header'=> "Content-type: application/x-www-form-urlencodedrn",
0 j+ u S0 M& j0 S4 A "Content-Length: " . strlen($data) . "rn",& W5 [3 B1 ~- j, E8 V5 b' ~
'content' => $postdata
/ B& o0 A2 K/ @! [2 f% c3 t )5 g2 X, C$ }0 N h+ B9 n/ t
);( q) ^4 a) U) p E. N. d
' `9 p2 u* {3 m% Q; m4 `' r
$context = stream_context_create($opts);
! q1 F5 `% V, g# c( ~. ^ $html = file_get_contents($url, false, $context); ' P( e2 i" _7 v, I2 A4 r9 s' e
- Y# t; M) e/ ^! Q" f! ^ |
|