管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
& `' Q7 @' X0 H0 o( }% O, y* O( T: O1 v# R) e6 V
$opts = array (% S( s. T; F6 s9 D2 M
'http' => array (
& q r; E* p8 H0 N. T 'method' => 'POST',
U; I& e) F' I; h3 j, {" r 'header'=> "Content-type: application/x-www-form-urlencodedrn",4 i8 @4 H2 J. H
"Content-Length: " . strlen($data) . "rn",% H, k2 s) P# b; Y$ ^1 A1 g
'content' => $postdata
$ j- V' r: A( }% O0 _7 F- Z )
; J3 d% g( B; X) h );
9 d& R6 B5 p5 j7 S3 ]6 r: V$ z
* J* S/ H( g) B* h $context = stream_context_create($opts);! R5 g1 D1 j$ H7 N _1 d) L
$html = file_get_contents($url, false, $context);
; X8 B \# z7 f* }- g9 s
) D0 ?/ w4 T. ~' G' m0 b: J |
|