管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);; [; D' {6 i( x! q" i2 \
2 I% A s e6 c2 S0 ^ $opts = array (* S$ h$ `3 @$ A
'http' => array (3 ^0 e# I, l" e7 O1 R+ I
'method' => 'POST',
8 \. V6 a# ~- A% ~* T2 n 'header'=> "Content-type: application/x-www-form-urlencodedrn",9 H. }; |! T8 e( t
"Content-Length: " . strlen($data) . "rn",
' c3 ]' Z+ q7 L* a2 E: | 'content' => $postdata
4 ^" z9 m0 y: g! ? )$ a4 o V& }- [' M( j" g( |5 P
);' F- v, D$ p" n* ?3 x7 B) h3 p
' c% s+ h5 n' i% S $context = stream_context_create($opts);+ o6 o: B7 g6 a
$html = file_get_contents($url, false, $context); 2 c4 n1 B9 e: N: q( g
8 k; }4 z) N. f1 F
|
|