管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);9 i: s. d; M! `! U
5 K" f/ g* K, {) z; H $opts = array (, q( I0 q- O% G7 c& N+ O
'http' => array (6 @, r: A( d. P& T) ^3 z: F
'method' => 'POST', r& K' n. c& r: j$ r
'header'=> "Content-type: application/x-www-form-urlencodedrn",
; v6 \% W# b6 B" ]- x! x" W$ n "Content-Length: " . strlen($data) . "rn",
, X9 K! z' { R" B* V+ M( z 'content' => $postdata5 U- @0 Z% o& v
)
' e0 _3 B4 i! Q, f b" T );
) |& S4 J1 D* @" h3 o4 \% J6 G6 k) `1 t
$context = stream_context_create($opts);% G5 V' F Q" X- ?3 M S& O
$html = file_get_contents($url, false, $context); : R8 {* ?4 A2 {
% B' i; c7 V9 x8 J/ K+ V) x' p- z9 f! l |
|