Home >Backend Development >PHP Tutorial >PHP small example: grab basic information code_PHP tutorial

PHP small example: grab basic information code_PHP tutorial

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

 Bangkejia (www.Bkjia.com) TutorialIn the end, I have to use php to do something! The haze of php has always shrouded me! Haha! Don’t complain about it, let it be Used for my pleasure. Learn all his essence. Fetching has always been my strong point. If I look at PHP two years later, let’s start here. Haha!

The code is as follows (currently copied from another website, it will be gradually improved and powerful in the future):

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

Article from: http://www.cnblogs.com/jguangliang/

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364321.htmlTechArticleLieHuo.Net tutorials will eventually have to use php to do something! The haze of php is always shrouded I! Haha! I don’t complain about it, let it be used happily for me. Learn all his essence. Grab one...
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