管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);3 e' N8 N8 v; _' z! G q# t; ~
P% ?" {8 Q1 F
$opts = array (% s5 g* M( x9 L8 t* j9 ?
'http' => array (" R1 [8 M; o+ |1 J! I
'method' => 'POST',2 f+ e" y# N) R/ k3 O) B. V/ I7 k
'header'=> "Content-type: application/x-www-form-urlencodedrn",
3 S9 X- f4 ]) f/ E' Z; u9 v# R' r1 F j "Content-Length: " . strlen($data) . "rn",5 Y1 L* k/ l! t' G" ]
'content' => $postdata& F% s" T3 b- Z# H8 t+ L
) Y4 O0 M/ ~# C* J( p" O. n
);
8 z7 i i. Z& n5 L- v3 c7 x7 r4 v k( K; y/ U6 b
$context = stream_context_create($opts);+ m/ d, c" u8 Z; [7 C
$html = file_get_contents($url, false, $context);
8 f: ]0 x9 V! Z+ g. t/ c
6 D" a. b A3 ^* c5 w. M, A |
|