管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
. m! [0 ^( R; q' p" N5 ?& }6 q; k, H- x- ?1 b6 z& e
$opts = array (
, p+ t3 N. r4 P: ~% h" c% T 'http' => array (
8 b7 q4 ^% y* f1 c9 \ 'method' => 'POST',
9 y( y9 _* e) B! ?' [ 'header'=> "Content-type: application/x-www-form-urlencodedrn",3 r$ X" p5 y+ i
"Content-Length: " . strlen($data) . "rn",
/ A, Z q1 a; J& n. d 'content' => $postdata( t5 G9 b/ _1 \/ K- F
)1 T' t+ K3 v; W/ I/ ]8 D a
);
, Q/ {- p1 d8 |6 W. V n+ r7 k
$context = stream_context_create($opts);- B+ L% y1 G, h& T$ |7 u0 V
$html = file_get_contents($url, false, $context); 5 X# v V a Q9 O0 \ W- [
2 A4 U* m8 ` J$ x" M+ D |
|