管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);- N, [5 ^( p# B# t
- B( z* G0 {$ g) ^ A $opts = array (
0 q* i: g& M% x9 m- o4 M$ B9 { 'http' => array (
3 F& \7 i& Z" g 'method' => 'POST',
" e3 ~7 s: A& R- ~( a8 O 'header'=> "Content-type: application/x-www-form-urlencodedrn",) Z0 O3 s3 Q) O [8 B, M1 y4 F
"Content-Length: " . strlen($data) . "rn",6 C# y# L7 ^* N' }3 n; R) `
'content' => $postdata: |( V4 M) B3 M# m" d& A
)
* B1 c V6 G- x* B% r) Q% b );: u6 X- X' S$ E! u- u, j/ `( d
5 C0 c+ ?4 e' C& w S
$context = stream_context_create($opts);: v5 M1 ~1 o! y7 l: x8 c0 `
$html = file_get_contents($url, false, $context); 8 e6 o' s5 a+ B, }( B
& X# Q/ \: j4 R# X/ f
|
|