管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
( |$ k8 f3 v0 ^0 _6 Y: s' p7 x, V& m/ z( U& L
$opts = array (2 F" }6 j5 q1 W4 R2 t e
'http' => array (
0 N. |, ^: I2 U: R3 Q; {" G 'method' => 'POST',
( x* U3 U3 z% o4 | 'header'=> "Content-type: application/x-www-form-urlencodedrn",
$ q, z+ b1 e" g' n "Content-Length: " . strlen($data) . "rn",$ Q/ @8 y+ x. o! M! r. x2 i
'content' => $postdata- b* c9 [" O6 ~) G/ F% u# B( S8 E3 B3 Z
)# J q1 N3 d% B0 a0 {% O# A
);1 W% P2 @1 o# U6 V) t: Z
9 p4 f! u3 \# R `: Q
$context = stream_context_create($opts);+ M9 F8 }; K8 R+ o
$html = file_get_contents($url, false, $context);
' N& Z$ f4 m! C% J# E
1 s+ a s& R) y2 Y |
|