参考:http://www.netasp.com.cn/valley/gettitle/index.php
代码如下:
<pre>
<?
//get_title.php
$file=file("http://www.netasp.com.cn");
$count=count($file);
for($i=0;$i<$count;$i++){
if(eregi("<title>(.*)</title>",$file[$i],$out)){
$title=$out[0];
}
}
$title=substr($title,7,-8);
echo $title;
?>
</pre>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
本网刊登的文章均仅代表作者个人观点,并不代表本网立场。文中的论述和观点,敬请读者注意判断。
本文地址:http://www.xlkjgs.com/notes/html/2227.html