$url="http://www.google.com";$fcontents=file_get_contents($url);//第6行
@eregi("<title>(.*)</title>",$fcontents,$rg);//截取内容echo $rg[1];//输出标题有时能正常显示“Google”但也有时会显示:
Warning: file_get_contents(http://www.google.com) [function.file-get-contents]: failed to open stream: HTTP request failed! in E:\Web\htdocs\index.php on line 6