管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
p8 `4 O$ C5 Q8 p- P: l+ h+ V' r h, x: ^0 |5 Z
$opts = array (
5 r5 X K2 n: c5 Z* z 'http' => array (; r+ @9 f& l$ \( F( ~' z
'method' => 'POST',
+ G1 k6 d9 |, e. v* [ 'header'=> "Content-type: application/x-www-form-urlencodedrn",$ k/ V! u$ c+ q7 l
"Content-Length: " . strlen($data) . "rn",
" J# m: a7 T* k; C/ y 'content' => $postdata
, H# B7 y2 j9 W | )
# s2 |+ c1 I S/ b o x ^2 J; D9 z ); O( V7 B( ?- {1 d, k. a/ q1 b
' \! }' q: }! @* j+ V, ^. i $context = stream_context_create($opts);
% G9 V6 |4 T- L) e $html = file_get_contents($url, false, $context);
8 p- v* b# U! `/ Q# _# H
+ f% v; V3 c" i |
|