管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);* O1 y7 C/ b! c! B
2 G2 o/ w7 B/ I% X: c
$opts = array (7 ?# C& f5 V8 R9 A
'http' => array (
6 k7 j4 `- j5 ?- h( P3 p 'method' => 'POST',! z" Z2 ?/ q+ q8 [) Y
'header'=> "Content-type: application/x-www-form-urlencodedrn",
# n$ n' l4 S, W6 L/ w "Content-Length: " . strlen($data) . "rn",
* w' O7 T8 z3 a( b4 U 'content' => $postdata
' i& G; K: f9 R, }4 H )' K* h# o, E* d% e" ?; \
);- t' ~% M4 E# ^3 d
$ J% N5 _0 _: r1 x5 c $context = stream_context_create($opts);2 g1 U4 T5 J# v2 u/ m
$html = file_get_contents($url, false, $context); , ]- c) Z5 N* C9 m- E' D! F
1 s- ` P7 ^: s; S: F- @
|
|