实用PHP网页抓取
<html>
<head>
<title>PHP 网页抓取测试</title>
</head>
<body >
<?php echo ''<p>Hello World!</p>''; ?>
<table>
<tr>
<td>
sssss
</td>
<td>
ooooo
</td>
</tr>
</table>
</body>
</html>
<html>
<head>
<title>实用抓取网页内容测试 </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body >
<?php
$url = ''http://localhost/test.php''; //测试本地网页
#$url = ''http://www.myenjoylife.cn/index.php''; //抓取www.myenjoylife.cn首页内容
$lines_array = file($url);
$lines_string = implode('''', $lines_array);
eregi("(.*)", $lines_string, $head);
echo $head[0];
?>
</body>
</html>
http://blog.csdn.net/hongyu6/archive/2008/03/11/2170585.aspx
补充:Php教程,Php常用代码