管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
! |5 h2 k1 Y3 ~* E: I1 D' w1 j) b& @5 n& A; m1 {+ E
$opts = array (7 E# z5 h" Q) f6 h. w
'http' => array (% J* k4 K+ m6 f8 E
'method' => 'POST',
, y( n* ^* j8 g- a9 q 'header'=> "Content-type: application/x-www-form-urlencodedrn",* H4 g7 \9 ?( w: n% k* ?5 R
"Content-Length: " . strlen($data) . "rn",
2 w9 m$ S. A" y [: ?8 a) V9 Z' ]/ L9 g 'content' => $postdata$ Q4 F( q/ N# }: V+ _7 n
)
9 I& P' u0 C6 G* Y# [ );0 o4 y2 }) F( ]- e: T
1 m( U' f1 s4 B" d4 Z0 q- l $context = stream_context_create($opts);
, p8 R$ I8 u+ L $html = file_get_contents($url, false, $context);
+ W1 k+ {/ D9 B
$ l5 `2 T r' u( x$ M6 Q8 _7 K |
|