管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);# G% T2 a+ X2 h
# i( C; _- s1 D9 V $opts = array (
4 `% l# y v5 ?6 }7 `8 @5 e* ~ 'http' => array (0 ]8 q, ]! f% E4 g$ W N
'method' => 'POST',
; X) C( A* O x/ y3 ^- W1 u" _ 'header'=> "Content-type: application/x-www-form-urlencodedrn",# B* J- x- e2 `" `. B& Y6 J
"Content-Length: " . strlen($data) . "rn",& Z% m" ^+ ?' m; p3 Y
'content' => $postdata& D+ o9 A& r W9 n" T
), X0 L9 @8 p) k8 w6 ^
);0 L9 X& V- b/ Q+ X/ k
' F* ~$ c0 }* H8 W `. \ $context = stream_context_create($opts);
. ? [5 \; `$ d, i( s% q8 N $html = file_get_contents($url, false, $context); + `/ L5 R6 S: @
/ W; ~5 `: g5 E
|
|