管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
6 A% n* b& j; ]8 f$ D2 `
# P2 \+ A9 k+ w9 s/ \ $opts = array () V- e+ e, [5 e. Y& T) }% z0 ?
'http' => array ( P9 E3 ~$ d# U
'method' => 'POST',, k; h0 z$ o) i4 P4 x8 Q2 s. B( X
'header'=> "Content-type: application/x-www-form-urlencodedrn",: b Z4 f7 u' b& _) z
"Content-Length: " . strlen($data) . "rn",
3 ^5 X7 a9 n2 K3 d5 @* G1 ~! P 'content' => $postdata3 e, D2 Q8 I3 h5 K# s( l. n
)
4 `: F+ `# [) p. H# Y; G0 ?$ _ );4 \3 W3 b1 ?% w. A) Z/ z" K- b9 S
+ \; s+ t S, r) x
$context = stream_context_create($opts);
/ w% z1 x/ R6 B: _/ K0 n $html = file_get_contents($url, false, $context);
2 F: R; G0 R" q& Z6 Q! L. D' Q; {9 e% R& _: ^
|
|