管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
( e# d- M! i( F( n" L6 [. d- Y4 f! r) l
$opts = array (
: C3 ?% s& B, H' z3 i' {( L6 P 'http' => array (
/ N! ~6 e2 z8 k 'method' => 'POST',' \- P2 Y6 |+ }( B+ H- ^
'header'=> "Content-type: application/x-www-form-urlencodedrn",
, w0 K, c9 h+ l* { f "Content-Length: " . strlen($data) . "rn",/ L- Y2 A& V% l
'content' => $postdata
% s' r0 A: F: F7 o8 s4 r" \ )5 R$ a* g- K5 ^. |% `' O
);
( r* i5 m) G) o5 w+ v$ W
0 k" y8 N" Z3 D" s: ^ $context = stream_context_create($opts);1 L5 d9 ^/ s% `: b
$html = file_get_contents($url, false, $context);
4 e3 F x( s: t' A+ S; b3 f4 x$ n4 ?! z' K' h7 l# A! M! g+ x' l
|
|