管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data); D, R! K) |" M( ?
; {& d: n* U$ {; M0 I $opts = array () J3 d j; @$ S4 u* G3 l
'http' => array (
8 U0 Q/ v6 R' c. e 'method' => 'POST',
1 X1 c3 Z2 c7 c u; j 'header'=> "Content-type: application/x-www-form-urlencodedrn",
6 q& r8 x9 s) e) [ "Content-Length: " . strlen($data) . "rn",
4 [, m% G! E* M! c. z3 d6 j 'content' => $postdata9 @. Y/ G: s9 R. |
)0 F/ F; i5 i0 H1 E7 |( c; `3 u
);
5 R/ \) J* \$ `; Y8 k5 w. g: `' a$ ?8 l! ?# Y2 x& |
$context = stream_context_create($opts);
* h2 M/ B- s5 f* R9 d% c $html = file_get_contents($url, false, $context);
% w2 X( C5 N: n5 R% J0 C8 b$ L0 l' f. e
|
|