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

Example of intercepting website title tag home content_PHP tutorial

WBOY
Release: 2016-07-21 16:02:01
Original
953 people have browsed it

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><br>for($i=0;$ i<$count;$i++){ <BR> 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> 


[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]

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316651.htmlTechArticleReference: http://www.netasp.com.cn/valley/gettitle/index.php The code is as follows: pre ? //get_title.php $file=file("http://www.netasp.com.cn"); $count=count($file); for($i=0;$i$count;$i++ ...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template