管理员
论坛积分
分
威望 点
贡献值 个
金币 枚
|
$postdata = http_build_query($data);. j" H2 i U- a
' U) h0 r: K- w7 a( H, m $opts = array (% l" y; t9 a* W6 X2 z- h) c8 c
'http' => array (
% a. D; ]- I. ]9 [* o+ } 'method' => 'POST',9 T8 i5 y' i" G" O1 o
'header'=> "Content-type: application/x-www-form-urlencodedrn",
1 [9 T6 W/ `) v1 ~ "Content-Length: " . strlen($data) . "rn",8 E( O4 z2 p; d6 W1 h
'content' => $postdata
% |" C) c" `6 V: n )" ^$ r: X$ n: T
);- F. d( b- u! p/ K6 v
3 e4 E: W6 v1 P6 H. s( h4 G
$context = stream_context_create($opts);8 S) w$ w$ z1 S" T! z
$html = file_get_contents($url, false, $context); * O( \6 g5 x2 E, p y
, E6 W% z5 W" x( k% H
|
|