管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);7 P$ L# ~! z, i; L
: A$ V' a* y' P: X
$opts = array ( r! I9 S: X0 S
'http' => array (
7 Z* m1 s( M; \! ~! g 'method' => 'POST',
9 @& {$ U$ e, t' @+ j. { 'header'=> "Content-type: application/x-www-form-urlencodedrn",( g, _ W; M( W H7 F
"Content-Length: " . strlen($data) . "rn",
" R) J/ X$ c: x% n6 r8 {* ~9 b 'content' => $postdata- ^1 U1 [4 X) m9 l N& V' V& I
), F* a$ X- D" [3 N! r; V1 s
);
! N( w- I+ \1 b7 Y$ }
" D' d. N* V1 x2 d- ]1 b $context = stream_context_create($opts);0 g ^3 X T* ?1 V4 u8 ~
$html = file_get_contents($url, false, $context); ) X: H# \, c2 a: r; a5 \
h, E T8 Y6 w: [3 m ` |
|