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]