[phpstudy]php 搜狗评级查询程序

更新时间:2016-05-13    来源:安卓教程    手机版     字体:

【www.bbyears.com--安卓教程】

$sourcecode=getsourcecode("http://www.sogou.com/web?query=".$q);
//echo ":".$sourcecode;
if($sourcecode){
$sourcecode=iconv("gb2312","utf-8",$sourcecode);
 preg_match("/搜狗评级:(.*?) /", $sourcecode, $cmatche);
 if($cmatche[1]){
  echo "<script type="text/javascript教程">parent.document.getElementById("sogourank").innerHTML = "".$cmatche[1]."";</script>"." "; 
 }else{
  echo "<script type="text/javascript">parent.document.getElementById("sogourank").innerHTML = "0/100";</script>"." "; 
 }
}

本文来源:http://www.bbyears.com/shoujikaifa/23844.html

猜你感兴趣

热门标签

更多>>

本类排行