管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data); Q6 O% G: j) v2 H9 w2 V/ p
! j( _4 E ?9 m4 ?/ w0 g $opts = array (8 |7 W: R3 s, H4 K; ?
'http' => array (! @9 R6 I6 v% c( T- |! H
'method' => 'POST',1 b2 y8 ^, V8 {2 t D5 L/ _* ~% ^
'header'=> "Content-type: application/x-www-form-urlencodedrn",
9 [7 R1 }! T% O "Content-Length: " . strlen($data) . "rn",( U8 {$ y) N9 w3 ~* x! U# m! i
'content' => $postdata
" w% a- p3 _1 @2 g )
: \% g: c4 k8 f' H6 \5 G );( E/ ?- L! F2 I _9 ?) W* o
* L8 e+ n; c, E1 ~/ h. B
$context = stream_context_create($opts);
9 s: f: f4 O2 v. w& B! e $html = file_get_contents($url, false, $context);
( g6 L& ^* r3 W' ]- ^3 V4 V( u2 X: v9 }
|
|