管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
@* O2 ] o8 g/ h% z" F$ P1 j8 N8 o- ^* W+ { h+ H( M
$opts = array (
6 b6 [% U$ f* u- r# D 'http' => array (3 C( }8 f7 t0 F* ]
'method' => 'POST',
. v( A/ L" o* N0 {7 K( ~8 \; i y. C 'header'=> "Content-type: application/x-www-form-urlencodedrn",
% L9 v# r8 g- z, G9 n "Content-Length: " . strlen($data) . "rn"," c& E( i6 {9 z. l1 I' d# a
'content' => $postdata
; k) L* Q( @( O )
% X& ^- T0 e7 ~6 { );
) W: q( R# M4 m" P$ E4 [
. [# t! x/ t$ F0 z$ H1 j $context = stream_context_create($opts);
8 d1 ?6 S1 R& H# T5 ?0 w* S( f5 ^ $html = file_get_contents($url, false, $context); " Z% J9 q R$ N% ?& T f. Q
9 v( j$ z+ |; o# ^$ B |
|