管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
1 Y/ I8 l# A4 M. W, K! H; D1 [5 n( z2 n$ R& H' [
$opts = array (* x! ^% j8 @" e! r7 x+ v* c: f2 F
'http' => array () E) x r+ @. x$ _. m
'method' => 'POST',
8 P0 f: _% V" }) i) E4 `# A 'header'=> "Content-type: application/x-www-form-urlencodedrn",
% J' h! d8 D4 @% K" n: w: ?0 { "Content-Length: " . strlen($data) . "rn",
' C. C( c+ D) i" S; S; P& b 'content' => $postdata
' B+ h' y6 w* V+ G )$ V6 N/ D4 a7 p( Z, M8 }3 A
);. y$ s7 x; G9 p1 O4 l: [" M
4 F; V0 f Q" G1 P4 k% ?( V
$context = stream_context_create($opts);
2 L7 X" @/ ^ Q& d* o8 F) ~* | $html = file_get_contents($url, false, $context); [& y" G/ U; n0 r& w
6 `! |: ]9 [9 s2 F ]
|
|