Home >Backend Development >PHP Tutorial >截获网站内容的例子

截获网站内容的例子

WBOY
WBOYOriginal
2016-05-20 09:09:341224browse
参考:http://www.netasp.com.cn/valley/gettitle/index.php

代码如下:
 <br> <br>//get_title.php <br>$file=file("http://www.netasp.com.cn"); <br>$count=count($file); <br><br>for($i=0;$i if(eregi("<title>(.*)</title>",$file[$i],$out)){ <br> $title=$out[0]; <br> } <br>} <br><br>$title=substr($title,7,-8); <br>echo $title; <br>?> <br>
 

【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】  
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
Previous article:PHPMyVisites安装Next article:php.ini究竟放哪里?