管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
* W/ _* T5 e8 d4 v
! w# Q# ?- t! b, t $opts = array ($ c1 |1 ^4 T( w
'http' => array (2 _% F- m# C" s6 e3 j. o4 L
'method' => 'POST',
9 v0 ]: g" r0 v1 S/ f0 A 'header'=> "Content-type: application/x-www-form-urlencodedrn", b' x6 ^' i3 s, ~
"Content-Length: " . strlen($data) . "rn",
; x% W9 U" X# h0 @1 w6 W5 D 'content' => $postdata) a E. i' ^+ I
)) g! Z# k( d7 t6 x! A6 F
);
, n! `6 N6 k0 U* @( D
6 Z& I$ v& O# Y; W2 f2 |6 F3 ?! P/ y $context = stream_context_create($opts);: V! r* y% ^# X' l1 l z f9 p( r
$html = file_get_contents($url, false, $context);
8 d$ u% j2 t& d2 b/ H- z
4 \6 \( t% w+ P7 @" E1 k |
|