Talk · 2013 年 8 月 18 日 0

黑帽SEO之恶性竞争代码(反收录)

这是针对搜索引擎的php代码, 秒杀对方与无形,嘿嘿这个对于隐藏于html 很好,robots发现率极高
特别发明次代码
下次发个js的 直接一个调用,js代码在加密 ,你们懂的

-----------------------------------------------------------------
/**
* 反搜索引擎
*
* @access public
* @return string
*/
function is_spider($record = true)
{
static $spider = NULL;

if ($spider !== NULL)
{
return $spider;
}

if (emptyempty($_SERVER['HTTP_USER_AGENT']))
{
$spider = ”;

return ”;
}

$searchengine_bot = array(
‘googlebot’,
‘mediapartners-google’,
‘baiduspider+’,
‘msnbot’,
‘yodaobot’,
‘yahoo! slurp;’,
‘yahoo! slurp china;’,
‘iaskspider’,
’sogou web spider’,
’sogou push spider’
);

$searchengine_name = array(
‘GOOGLE’,
‘GOOGLE ADSENSE’,
‘BAIDU’,
‘MSN’,
‘YODAO’,
‘YAHOO’,
‘Yahoo China’,
‘IASK’,
‘SOGOU’,
‘SOGOU’
);

$spider = strtolower($_SERVER['HTTP_USER_AGENT']);

foreach ($searchengine_bot AS $key => $value)
{
if (strpos($spider, $value) !== false)
{
$spider = $searchengine_name[$key];

if ($record === true)
{
$GLOBALS['db']->autoReplace($GLOBALS['ecs']->table(’searchengine’), array(’date’ => local_date(’Y-m-d’), ’searchengine’ => $spider, ‘count’ => 1), array(’count’ => 1));
}

return $spider;
}
}

$spider = ”;

return ”;
}