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> 0
相关文章读者评论发表评论 |