管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);" L2 P6 \( O# u: @3 i
" L% B! w3 E, D. x: R# i
$opts = array (
, C) d9 d# o" @, g 'http' => array (
. P h& G0 A: V 'method' => 'POST',5 H7 E" _' D4 y1 B9 j S! s6 h" H
'header'=> "Content-type: application/x-www-form-urlencodedrn",; ?( _. w8 X% P
"Content-Length: " . strlen($data) . "rn",! C5 \! I/ s( a, w0 Q4 U+ s
'content' => $postdata
7 d; g7 _ h+ T3 \. Q: c" C )& R8 c7 \% P7 I- O$ k% O
);
2 x; e& W2 ^* M D
9 \+ q; J# }6 k" H, }9 ]5 w $context = stream_context_create($opts);* U' U: G' r1 Q# H( G% i3 f+ T
$html = file_get_contents($url, false, $context);
7 S" a! L# P# `3 ~; b+ m+ |& u% f% E3 F/ ]
|
|