管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);0 M, U/ z9 Z8 l: J# h0 x) E/ n
% W' L4 t& e) Q
$opts = array (
- z, p6 n2 [7 ^8 r4 j2 w, t 'http' => array (
0 }2 `/ R1 U; u 'method' => 'POST',
Z! U1 k; ^7 n 'header'=> "Content-type: application/x-www-form-urlencodedrn",+ ]/ ?6 H: P( G5 b
"Content-Length: " . strlen($data) . "rn",% _( }) |* V3 O
'content' => $postdata
Z! A$ C: y q6 \+ A. k) @ )+ R/ F/ W; K( m
);) A3 }, _& d1 C
* I C6 M7 S* o. D$ E/ g6 w $context = stream_context_create($opts);
' j( v# i$ i! ^ h. D8 w1 m $html = file_get_contents($url, false, $context);
. Q, k0 L$ ], r# n
. O4 U6 b' R9 _7 W( v |
|