管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);' V% T* y6 K! {. F2 ?& l k
6 J2 w* b' D9 B $opts = array (
8 b: N/ v+ |1 v, S0 V0 l 'http' => array (( {4 Y$ Y7 h7 w% A
'method' => 'POST',9 X" J" c |+ x" C V. ?
'header'=> "Content-type: application/x-www-form-urlencodedrn",& k# k) H" F7 b7 N( F( n! |7 i
"Content-Length: " . strlen($data) . "rn",
: g4 o8 c/ e y. R5 S6 G9 q R 'content' => $postdata
% D$ S$ q% t+ y! L t- |8 | )
$ S& T; U1 i) D& a );" ^9 U% T6 z/ n8 y6 S! @) ~1 r
H4 n6 u6 k n) _4 k $context = stream_context_create($opts);- s3 q" u/ W* {$ |" M% Q
$html = file_get_contents($url, false, $context);
& l5 n: S9 x2 z$ ?) I
2 w f* J3 z5 H5 O |
|