管理员
   
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);
- k2 L: @9 V2 @2 b8 U, z- `' [- c6 b) |( w! F
$opts = array (
$ l) S4 a" B- ]$ ^+ | C! m; | 'http' => array (( R& K' _' X% K- ~+ ]# d0 \! B+ R
'method' => 'POST',
- Y: c% K: x# E7 F 'header'=> "Content-type: application/x-www-form-urlencodedrn",+ x( y: F6 [0 c# d" z) {& d
"Content-Length: " . strlen($data) . "rn",
' g. {0 h# @1 a4 R* D6 U! [ 'content' => $postdata( D8 }/ m; s3 |5 X! k, j# y% F# j
)* Z5 N% t2 f5 J, q
);* m% Q! v( [/ @3 V5 Z5 B
/ s E D1 Z. U8 V $context = stream_context_create($opts);
+ |* n5 R. U8 t8 w" v- { $html = file_get_contents($url, false, $context);
8 _7 P: t7 ~/ |/ P y6 m
3 j) ]& [5 O" A, N& {1 V |
|