专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »PHP教程 » php抓取图片:实用PHP抓取网页内容测试 »正文

php抓取图片:实用PHP抓取网页内容测试

来源: 发布时间:星期五, 2008年9月5日 浏览:386次 评论:0
01 <html>
02 <head>
03 <title>实用抓取网页内容测试 </title>
04 <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
05 </head>
06 <body>
07 <?php
08 $url='http://localhost/test.php?username=$username&passoword=$password'; //测试本地网页
09 #$url='http://192.168.1.158/sms?username=$username&password=$password; //实际POST url
10 $lines_array=file($url);
11 $lines_string=implode('',$lines_array);
12 eregi("(.*)", $lines_string,$head);
13 echo $head[0];//这可能有时根据需要把post之后返回的参数进行拆分数组之类的一些问题,可以根据要求去实现
14 ?>
15 </body>
16 </html>

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: