远程获取360收录数量失效的问题

yaohaijin 发布于 2016/09/15 22:22
阅读 65
收藏 0
PHP

//获取360收录

public function getIndex360()
{
$url = $this->url;
$url = 'http://140.207.202.254/s?q=site%3A'.urlencode($url);
$data = $this->getContent($url);
//echo $data;
preg_match('/<p class="ws-total">找到相关结果约([0-9\,]+)个</p>/si', $data, $p);
$value = isset($p[1]) ? $this->toInt($p[1]) : 0;


return $value;
}


//获取360反链
public function getIndex360link()
{
$url = $this->url;
$url = 'http://140.207.202.254/s?q="'.urlencode($url).'"';
$data = $this->getContent($url);
//echo $data;
preg_match('/<span class="nums" style="margin-left:20px">找到相关结果约([0-9\,]+)个</span>/si', $data, $p);
$value = isset($p[1]) ? $this->toInt($p[1]) : 0;


return $value;

}

现在获取的显示为0

加载中
返回顶部
顶部