如何让你的论坛在Google搜索引擎找到

PHPBB2.0.X资源收集专用版,提问和建议请发到主版面
Locked
User avatar
土老耄
技术组成员
技术组成员
Posts: 1441
Joined: 2006-11-18 8:17

如何让你的论坛在Google搜索引擎找到

Post by 土老耄 » 2007-03-26 7:43

如果你想让你的论坛在各大网站中找到的话。试试下面的代码吧!
不知道算不算是外挂,不过自从俺装完了这个,Google每天都来俺家喝两杯咖啡再走。

Code: Select all

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/functions.php
# 
#-----[ FIND ]------------------------------------------------ 
# 
?>
# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#
function is_search_engine()
{
  global $HTTP_SERVER_VARS;

  $_this_agent = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];

  $search_engines = array(
  // W3C HTML Validator:
  "W3C_Validator/1.305.2.12 libwww-perl/5.64",
  // W3C CSS Validator:
  "Jigsaw/2.2.3 W3C_CSS_Validator_JFouffa/2.0",
  // GoogleBot:
  "Googlebot/2.1 (+http://www.googlebot.com/bot.html)",
  // GID GZIP Test:
  "GIDZipTest/1.2 (+ http://www.desilva.biz/gzip-test.php)"
  );

  foreach($search_engines as $search_engine)
  {
  if (!strcmp($_this_agent, $search_engine))
  {
  // Must be an engine... is in our list.
  return true;
  }
  }

  return false;
}
# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/sessions.php
# 
#-----[ FIND ]------------------------------------------------ 
# 
function append_sid($url, $non_html_amp = false)
{
  global $SID;
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
  if (is_search_engine())
  {
  return $url;
  }
另外最新的引擎机器人名单(放在includes/functions.php里面)

Code: Select all

  $search_engines = array(
  // W3C HTML Validator:
  "W3C_Validator/1.305.2.12 libwww-perl/5.64",
  // W3C CSS Validator:
  "Jigsaw/2.2.3 W3C_CSS_Validator_JFouffa/2.0",
  // W3C Link Checker:
  "W3C-checklink/3.6.2.3 libwww-perl/5.64",
  // Submit Express META TAG Analyzer:
  "MetaTagRobot/1.6 (http://www.widexl.com/remote/search-engines/metatag-analyzer.html)",
  // GoogleBot:
  "Googlebot/2.1 (+http://www.googlebot.com/bot.html)",
  "Googlebot-Image/1.0 (+http://www.googlebot.com/bot.html)",
  // GID GZIP Test:
  "GIDZipTest/1.2 (+ http://www.desilva.biz/gzip-test.php)",
  // Alexa/Internet Archiver:
  "ia_archiver",
  "ia_archiver/1.6",
  // Inktomi robot:
  "Slurp/2.0 (slurp@inktomi.com; http://www.inktomi.com/slurp.html)",
  "Slurp/2.0-KiteWeekly (slurp@inktomi.com; http://www.inktomi.com/slurp.html)",
  "Slurp/si (slurp@inktomi.com; http://www.inktomi.com/slurp.html)",
  // @nonymouse - WWW
  "http://@nonymouse.com/ (Unix)",
  "Fast Crawler Gold Edition",
  "FAST Enterprise Crawler 6 (Experimental)",
  "FAST FirstPage retriever (compatible; MSIE 5.5; Mozilla/4.0)",
  "Fast PartnerSite Crawler",
  "FastCrawler 3.0.1 (crawler@1klik.dk)",
  "FAST-WebCrawler/2.2.6 (crawler@fast.no; http://www.fast.no/faq/faqfastwebsearch/faqfastwebcrawler.html)",
  "FAST-WebCrawler/2.2.7 (crawler@fast.no; http://www.fast.no/faq/faqfastwebsearch/faqfastwebcrawler.html)",
  "FAST-WebCrawler/2.2.8 (crawler@fast.no; http://www.fast.no/faq/faqfastwebsearch/faqfastwebcrawler.html)",
  "FAST-WebCrawler/2.2.10 (Multimedia Search) (crawler@fast.no; http://www.fast.no/faq/faqfastwebsearch/faqfastwebcrawler.html)",
  "FAST-WebCrawler/3.2 test",
  "FAST-WebCrawler/3.3 (crawler@fast.no; http://fast.no/support.php?c=faqs/crawler)",
  "FAST-WebCrawler/3.4/Nirvana (crawler@fast.no; http://fast.no/support.php?c=faqs/crawler)",
  "FAST-WebCrawler/3.4/PartnerSite (crawler@fast.no; http://fast.no/support.php?c=faqs/crawler)",
  "FAST-WebCrawler/3.5 (atw-crawler at fast dot no; http://fast.no/support.php?c=faqs/crawler)",
  "FAST-WebCrawler/3.6 (atw-crawler at fast dot no; http://fast.no/support/crawler.asp)",
  "FAST-WebCrawler/3.7 (atw-crawler at fast dot no; http://fast.no/support/crawler.asp)",
  "FAST-WebCrawler/3.8 (atw-crawler at fast dot no; http://fast.no/support/crawler.asp) ",
  "FAST-WebCrawler/3.8/Fresh (atw-crawler at fast dot no; http://fast.no/support/crawler.asp)",
  "FAST-WebCrawler/3.6/FirstPage (crawler@fast.no; http://fast.no/support.php?c=faqs/crawler)",
  "FAST-WebCrawler/3.7/FirstPage (atw-crawler at fast dot no;http://fast.no/support/crawler.asp)",
  "FAST-WebCrawler/3.x Multimedia",
  "FAST-WebCrawler/3.x Multimedia (mm dash crawler at fast dot no)",
  "Overture-WebCrawler/3.8/Fresh (atw-crawler at fast dot no; http://fast.no/support/crawler.asp)",
  "Scooter2_Mercator_x-x.0",
  "Scrubby/2.x (http://www.scrubtheweb.com/)",
  "Scooter/3.3_SF",
  "Mozilla/5.0 (Slurp/cat; slurp@inktomi.com; http://www.inktomi.com/slurp.html)",
  "Scooter/3.2.SF0",
  "Mercator",
  "Spider"
  
  );
以上信息来自于竹猫星球俺家:oops:
祝!生意兴隆哦! :lol:

shamrock
渐入佳境
渐入佳境
Posts: 216
Joined: 2007-09-28 9:40

Re: 如何让你的论坛在Google搜索引擎找到

Post by shamrock » 2007-10-07 9:00

3.0不用这个勒吧??

Locked