管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
# l, S8 n0 p3 b! H3 m& i
8 h: A1 o! w! K9 ? $opts = array (
3 F) m' E/ |; A$ s8 o 'http' => array (6 m, v; j, U. b- C6 K$ F
'method' => 'POST',' U& z% g" n1 Y. U; i3 H
'header'=> "Content-type: application/x-www-form-urlencodedrn",
7 A6 R6 B6 m0 W "Content-Length: " . strlen($data) . "rn",; E3 r8 K4 e1 u
'content' => $postdata$ r0 P' ~, m$ u/ p' {" ?) p
)
) a7 ?3 \& @# s1 A+ W/ I );
- i' e4 R0 w7 ]: A4 s! }: L5 u8 I7 U5 Q7 \
$context = stream_context_create($opts);
B! g! }/ r2 ] $html = file_get_contents($url, false, $context);
. d7 I0 c2 Q# _% z4 f- c
9 r4 [8 m3 \/ `9 h; @. l: y5 R |
|