管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
5 W2 H: A/ |) l: y; e
[. i7 Y+ e. R7 M' C) u $opts = array (5 ?* x. c. l+ y3 o
'http' => array (; n, u( d- q7 @' O/ E
'method' => 'POST',
. X) [1 }3 O8 M, W 'header'=> "Content-type: application/x-www-form-urlencodedrn",- F0 T7 n3 B7 j: @% O7 f7 G
"Content-Length: " . strlen($data) . "rn",9 U, ]$ n F8 t% o0 C4 S
'content' => $postdata% {# f- y1 o5 ]' h/ k
)
; e; V$ u7 s2 S2 S& j% C2 C0 T );( E' P4 F, Z% {$ Y
" l4 |+ y1 C9 I$ p ^ Y
$context = stream_context_create($opts);
. H. C1 {& O8 G9 G, i1 H, j8 x" S $html = file_get_contents($url, false, $context);
9 i0 i5 \" p; D/ T
l" Q2 b, ]) j |
|