管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
% q& o+ O1 `! A Y( V& }% N; y. a1 ~) ?" x5 t; t
$opts = array (0 R& L' f5 E7 k* j Q1 k" q
'http' => array ( I) _$ h1 r' I- C" X
'method' => 'POST',* p) D# `/ _& D/ G
'header'=> "Content-type: application/x-www-form-urlencodedrn",
1 m$ I) ?5 i* T7 k5 d "Content-Length: " . strlen($data) . "rn",6 ~5 x% i% u2 ?$ s3 }0 i5 Q
'content' => $postdata" h+ h: i, a. S- D) s
)
& i: B3 e& T( @" J+ X& ~ );7 Y- {; m0 m3 G. R3 _3 E5 j
9 T0 |1 d. ?7 D. G; ]. k; ~ $context = stream_context_create($opts);
% @+ }7 \9 l' ? $html = file_get_contents($url, false, $context);
1 V0 K' y' E& ~' L# U# H3 [
2 g! W0 w7 Z$ I% {! z" h |
|