管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
7 _: m7 [ w9 _% X
, c1 d* z4 C( n $opts = array () B! ]. j; x0 n8 H8 \0 K
'http' => array (6 ` i- ?! |: y3 E
'method' => 'POST',
9 |) i8 t1 Z) p. }8 ]4 W 'header'=> "Content-type: application/x-www-form-urlencodedrn",
1 e$ O% F# L a7 _ "Content-Length: " . strlen($data) . "rn",9 ?0 q1 k; H7 Z/ D9 g: I+ l
'content' => $postdata$ \3 a/ G9 J2 l* E+ n s% U" _
)5 t" P! d; W# k' ?* w& s
);; R. {, U: l( U' e0 l1 p6 C! u3 K" C
! q B3 {1 d, u! e; E \1 w! J( k
$context = stream_context_create($opts);4 {* y0 N% w V* m4 ~
$html = file_get_contents($url, false, $context); 1 ?6 R6 Y( D2 T" C
7 @. G& a$ J# i# {5 F
|
|