管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
/ ^, C, i" x9 Y: C. l
! N, A- W; |5 ]6 v4 U/ J0 h $opts = array ( |0 q d& s0 y- k/ Y. i' o
'http' => array (
* O% i6 A9 w; P" ^5 [5 X 'method' => 'POST',
; ]/ X4 u" V- [2 w9 X, R) I 'header'=> "Content-type: application/x-www-form-urlencodedrn",% u3 y- l/ f9 [3 h2 {
"Content-Length: " . strlen($data) . "rn",9 n2 \0 `% p' V+ C
'content' => $postdata4 s# w6 u- L# }) Z4 m% w2 b
)' a3 E" H: Z; H
);
8 J7 b. ]1 q& U+ I' E% E0 J% o+ y& G6 v3 y Z Q
$context = stream_context_create($opts);
0 S8 b+ I+ q6 ? $html = file_get_contents($url, false, $context); ( S" K# p9 W/ w( W6 }
$ w2 a# A4 V9 Y6 B
|
|