管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);0 Y3 A6 v0 I% H, x7 @
6 c; T, c" E; O9 U. S% F* j. k
$opts = array (/ d0 L i/ A* }3 n
'http' => array (& {* j) `3 L6 A/ T
'method' => 'POST',
4 ]" i4 x. M/ } r8 T% C0 [" P2 J 'header'=> "Content-type: application/x-www-form-urlencodedrn",
! S9 W/ }% J `; F' P "Content-Length: " . strlen($data) . "rn",
% |4 c7 l2 d7 _ 'content' => $postdata
# K& D# m+ K* W0 { )
, x: R u4 ?1 E) J7 v, S );
v6 Y, `9 X5 q2 ]. s; C. U9 O
' B' a6 B/ m# |" U# G $context = stream_context_create($opts);% x, t& T8 L" K) I" l' f) @! I! ~
$html = file_get_contents($url, false, $context);
7 Q# w2 k l9 Q& v; `* _& ^
. I/ N4 o+ x* j4 L) E1 w# ` |
|