程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> php 網站反鏈接收錄查詢 google,baidu反鏈

php 網站反鏈接收錄查詢 google,baidu反鏈

編輯:關於PHP編程

本款主要是針對google,baidu來寫的一款網站反鏈與收錄查詢哦,

本款主要是針對google,baidu來寫的一款網站反鏈與收錄查詢哦,

if($site) {
 $buffer = @file_get_contents('http://www.baidu.com/s?wd=site%3A' . $site, 'r');
  if($buffer) {
   $BaiduSite = cut($buffer, '找到相關網頁', '篇');
   $BaiduSite = str_replace(array('約', ','), '', $BaiduSite);
  }
 $buffer = @file_get_contents('http://www.baidu.com/s?wd=domain%3A' . $site, 'r');
  if($buffer) {
   $BaiduDomain = cut($buffer, '找到相關網頁', '篇');
   $BaiduDomain = str_replace(array('約', ','), '', $BaiduDomain);
  }
 $buffer = @file_get_contents('http://www.google.cn/search?q=site%3A' . $site, 'r');
  if($buffer) {
   $GoogleSite = cut($buffer, '有 <b>', '</b> ');
   $GoogleSite = str_replace(',', '', $GoogleSite);
  } 
 $buffer = @file_get_contents('http://www.google.cn/search?q=link%3A' . $site, 'r');
  if($buffer) {
   $GoogleLink = cut($buffer, '有 <b>', '</b> 項');
   $GoogleLink = str_replace(',', '', $GoogleLink);
  }
}

include MooTemplate("site_index");

function cut($file, $from, $end) {
 $message = explode($from, $file);
 $message = explode($end, $message[1]);
 return $message[0];
}


  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved