管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
9 [5 P1 r: p6 O7 n( V
9 S9 p3 h- ]* L8 f: q+ _ $opts = array (8 H0 R5 t+ w( J; C, n W' F. d) V
'http' => array (
0 L6 y* S9 f; f7 Y2 m0 F- E& s 'method' => 'POST',/ z& E: q& U+ X+ B
'header'=> "Content-type: application/x-www-form-urlencodedrn",
0 u& H5 S- T6 ?5 O& Q0 V: H "Content-Length: " . strlen($data) . "rn",
2 r7 e+ \; n, l& y( }9 K: [ 'content' => $postdata7 B) m" X; @7 T- \
)) X% [- i8 w" [! G( D
);
& z: T2 o* ]2 e6 _9 S4 h1 E, }! v
) O* H2 ?! h$ L/ g& T5 K. v3 W% H' _- e1 Q $context = stream_context_create($opts);
) @/ P E. V6 f: d g, D $html = file_get_contents($url, false, $context); ; C+ F ?8 K9 _
9 l) ^" l6 ?3 ]) H |
|