管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);; r; _1 R& k0 x4 C8 G# |
$ x8 R% @* W8 b: z C6 r* k1 @
$opts = array (+ N5 z2 ^0 Y) P3 o
'http' => array (
! m; B3 c: N7 p9 p2 W 'method' => 'POST',
g8 Q( l. k8 G; n- O1 G1 j t 'header'=> "Content-type: application/x-www-form-urlencodedrn",
3 i: R p7 N6 @5 L$ f" E "Content-Length: " . strlen($data) . "rn",
3 ~% f k1 f$ @% m! }$ A9 P6 y3 u 'content' => $postdata4 i# U7 U* ~9 W& p7 m9 r' s
). L4 P# n2 n/ w' n
);: Y1 Z/ _9 \0 \( u4 _0 G
& O5 `) h, y6 M' X: H
$context = stream_context_create($opts);$ V* w4 `! r5 q# q5 F
$html = file_get_contents($url, false, $context); 6 ]# f, ~# D+ r; y
3 s) K& |2 V ^: {, [3 W |
|