复制代码 代码如下:
<?php
$handle = fopen ("http://s.vevb.com/", "rb");
$contents = "";
while (!feof($handle)) {
$contents .= fread($handle, 8192);
}
fclose($handle);
echo $contents; //输出获取到得内容。
?>
复制代码 代码如下:
// 对 PHP 5 及更高版本可以使用下面的代码
<?php
$handle = fopen("http://s.vevb.com", "rb");
$contents = stream_get_contents($handle);
fclose($handle);
echo $contents;
?>
复制代码 代码如下:
<?php
$url = "http://s.vevb.com";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT,10);
$dxycontent = curl_exec($ch);
echo $dxycontent;
?>
新闻热点
疑难解答