管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
$ Q# `. U( R& U7 Q2 C* K" D% P
' H2 E1 c, T# H $opts = array (
3 e. R$ s1 r) Z3 I! N 'http' => array (
6 F6 L3 p! G2 ~$ [- ~( k9 X 'method' => 'POST',
7 s$ g6 ~* k! D% H/ n3 m) B1 n 'header'=> "Content-type: application/x-www-form-urlencodedrn",/ `( W7 Q4 J7 {5 E( I! e
"Content-Length: " . strlen($data) . "rn",
) ]; P2 n4 _8 d( P 'content' => $postdata8 k2 P" c g. [0 H( W
)/ F7 ~8 K& G' e5 u3 R
);
) B; E! C; _! t/ e$ a$ _) |
5 ]5 L4 M6 W) l $context = stream_context_create($opts);" [! j' r: e# {
$html = file_get_contents($url, false, $context); 1 t. O6 K% r$ U
6 K3 D7 u: u7 b$ n3 i ~0 j z; G |
|