管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);+ [ w: D( d) o& z/ [
) ?$ T' p7 S1 q7 E% J" i $opts = array (2 l/ n7 c# C6 z
'http' => array (
0 K, ?5 N2 V. x; d [ C _& T* p 'method' => 'POST',
1 v C: p1 o. U) T" W4 f2 A) s( F 'header'=> "Content-type: application/x-www-form-urlencodedrn",
# c2 u1 n4 s" Q "Content-Length: " . strlen($data) . "rn",
3 A9 ?2 o2 {: F 'content' => $postdata
* r7 `0 B7 F, g! W. {; Q7 n- a ): E7 N9 o% R: C9 k
);& q; m9 i9 A6 Q# |3 H
4 X; y/ @: f' {0 c1 u5 f3 n% ^ $context = stream_context_create($opts);
2 b/ X, ^9 B- g $html = file_get_contents($url, false, $context); 7 z8 F( ?, {+ J7 o( b7 q
5 Z; K+ ]8 b% U+ S+ c# c |
|