Home  >  Article  >  Backend Development  >  PHP小实例:抓取基本信息代码_PHP教程

PHP小实例:抓取基本信息代码_PHP教程

WBOY
WBOYOriginal
2016-07-21 14:56:01698browse

  帮客之家(www.Bkjia.com)教程 最终还是要用php来做些东西啊!php的阴霾始终笼罩我!呵呵!不抱怨它,让它为我快乐的所用。学习他的所有精髓。抓取一直是俺的强项,两年后再看php,就先从这里开始吧。呵呵!

  代码如下(目前是从别的网站copy一段,以后会逐渐完善、强大):

以下为引用的内容:
$num=file_get_contents('http://www.bkjia.com/'); //网址部分
$num=str_replace("xxxx","yyyy",$num); //模板语言用生成的程序替换进去
eregi("(.*)", $num, $head); //得到从之间的字符,并放到$head数组中
echo $head[0];
?>

  文章来自:http://www.cnblogs.com/jguangliang/

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/364321.htmlTechArticle烈火网(LieHuo.Net)教程 最终还是要用php来做些东西啊!php的阴霾始终笼罩我!呵呵!不抱怨它,让它为我快乐的所用。学习他的所有精髓。抓取一...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn