管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
7 S; j }6 ?: o8 \& L% O) j' j" Y% j8 \0 P
$opts = array (
0 y, b: J# @; M( S M( s 'http' => array (
3 \0 a; P% b7 P9 {- \. ? 'method' => 'POST',! j/ P v+ q, q, t
'header'=> "Content-type: application/x-www-form-urlencodedrn",, \# H5 e( q$ ^- Y
"Content-Length: " . strlen($data) . "rn",/ j3 J* }" R+ |2 w7 l5 p4 q
'content' => $postdata
6 U X' c/ k0 V" P% \! A4 g )
$ f; }$ ]) l: n# J( H! M. F7 Q );7 l' g" c$ \- y' @/ L; d
2 s3 B* F# z7 I# M: o, l $context = stream_context_create($opts);
0 f) p w5 n) \5 {4 u: A* d0 ]7 N+ s $html = file_get_contents($url, false, $context);
, u8 S& {4 r! U0 v! R. e( {0 @4 ?3 G
|
|