Home > php教程 > php手册 > PHP小实例:抓取基本信息代码

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:38:25
Original
965 people have browsed it

  帮客之家(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/

Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template