管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);$ ]6 e7 J1 S8 E# k
5 _$ \% z3 ]& R; n; |! j
$opts = array (( ~+ `% O7 g6 a# d9 ]
'http' => array (
1 b. z3 K, L: ^$ n7 N. l' w 'method' => 'POST',- Y9 l) C/ B$ d7 F* N% H+ W$ X
'header'=> "Content-type: application/x-www-form-urlencodedrn",0 I+ W) n1 A$ d8 D' B9 H
"Content-Length: " . strlen($data) . "rn",
0 o" x6 M/ A' `; x5 _8 m' }' O 'content' => $postdata( x3 p2 l' s/ D6 j9 Q! J# l+ K7 Q" @
)" v1 u# P6 t1 W: x+ R' T$ f# Q: m
);
: m3 b8 z# T, M! s! v8 M C* s. q6 s6 i- ^& k
$context = stream_context_create($opts);
3 T% D4 z8 N3 ]# D- v, D $html = file_get_contents($url, false, $context); ; u5 v9 a+ W; z; g4 J
" L: D. T1 I$ l5 r& ?5 u
|
|