Home > Article > Backend Development > Web page title Example of intercepting the content of the website title tag home
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 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.