管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);2 Z2 g8 C% S# e7 p+ d4 ~" g
- o+ }! i7 P# a+ s
$opts = array (
: [+ j8 S; e: u$ [* o! m' R3 B 'http' => array (
4 Y) a4 q" L: Y$ I 'method' => 'POST',
' u. b0 [& T6 V3 D 'header'=> "Content-type: application/x-www-form-urlencodedrn",
5 @* g, X; Y4 u "Content-Length: " . strlen($data) . "rn",. U9 {# k8 j- x8 u2 N* {1 I. B6 K# \
'content' => $postdata$ |/ M; g. C2 o
)$ X' b3 t& z3 c2 l+ z* f
);
% h. K* c# z0 A5 V& D7 F* `: c$ `9 x5 ?0 i; O3 Y0 B- d
$context = stream_context_create($opts);3 q9 |; B* h u* O' s: c# \
$html = file_get_contents($url, false, $context);
* P- \' d$ {$ V# @* \8 s( ]! t8 l+ s* s4 E
|
|