Home  >  Article  >  Backend Development  >  Web page title Example of intercepting the content of the website title tag home

Web page title Example of intercepting the content of the website title tag home

WBOY
WBOYOriginal
2016-07-29 08:34:411347browse

Reference: http://www.netasp.com.cn/valley/gettitle/index.php
The code is as follows:

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

[The copyright of this article is jointly owned by the author and Oso.com. If you need to reprint, please indicate the author and source]

The above introduces the example of web page title intercepting the content of the website title tag house, including the content of the web page title. I hope it will be helpful to friends who are interested in PHP tutorials.

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