Home >Backend Development >PHP Tutorial >Example of intercepting website content_PHP tutorial

Example of intercepting website content_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:31:52861browse

Reference: http://www.netasp.com.cn/valley/gettitle/index.php(as the current mainstream development language)

The code is as follows:
< pre>
//get_title.php(as the current mainstream development language)
$file=file("http://www.netasp.com. cn");
$count=count($file);

for($i=0;$i<$count;$i++){
if(eregi("(.*)",$file[$i],$out)){
$title=$out[0];
}
}

$title=substr($title,7,-8);
echo $title;
?>


[The copyright of this article belongs to the author and Oso.com Owned, if you need to reprint, please indicate the author and source]

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508855.htmlTechArticleReference: http://www.netasp.com.cn/valley/gettitle/index.php (as The current mainstream development language) The code is as follows: pre> ? //get_title.php (as the current mainstream development language) file=file(...
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