PHP头条
热点:

截获网站<title></title>内容的例子


参考: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>  

【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】    

www.phpzy.comtrue/phprm/30489.htmlTechArticle截获网站lt;titlegt;lt;/titlegt;内容的例子 参考: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(ereg...

相关文章

    暂无相关文章

PHP之友评论

今天推荐