管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
6 ]( ~+ p8 o. @; q, O
" H. d' C! e3 s2 G. F( V $opts = array (
( q% p r' g8 b5 a! P& T 'http' => array (7 `8 V* L& L4 T" _
'method' => 'POST',' j+ `$ P, B& D
'header'=> "Content-type: application/x-www-form-urlencodedrn",
, B; T5 t* Z- B "Content-Length: " . strlen($data) . "rn",
# r0 [" h. l3 H% u' v2 x 'content' => $postdata
, d+ a9 E- _, _5 W+ |* K7 {) N7 u+ `' c )
C- Y4 h5 R* p3 g. Y6 l+ }' b );" h$ p9 u8 b% ?, D. n* M
- S4 s$ p& R l, K $context = stream_context_create($opts);: ^- P9 t! w p0 z6 h0 V" m
$html = file_get_contents($url, false, $context); " T% O) D H6 q& Z* i% [4 l& j
1 n3 s' O z8 f; U
|
|