管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
& W+ l3 c& U, m) R: _
8 _ x( b) n* ^ O $opts = array ( t) ?' i: M! ~- x2 m& g
'http' => array (
9 p0 O; d E# }6 c% N: { 'method' => 'POST',
/ Y6 ?0 ?8 z4 a$ e; \; q8 v 'header'=> "Content-type: application/x-www-form-urlencodedrn",: l) ?7 O5 A5 ^$ ?9 \# R1 j
"Content-Length: " . strlen($data) . "rn",/ B# Q9 H* F+ p# H
'content' => $postdata
8 H. h, P3 `! W. F. |2 ]( o4 Z )
! E9 c& r) h8 J# k( z );1 ^- m1 u8 o/ r: u" P0 J( h6 t6 Y
u' ?0 A$ A: H2 T4 c $context = stream_context_create($opts);8 L+ S8 R7 c; e- K/ F. x
$html = file_get_contents($url, false, $context);
6 a+ \4 ~3 n# S( ~ N
" y/ n; U2 d" _' z1 _ |
|