arkadaşlar sitemde googlebot veya diğer botlar için yerleştirdiğim bir kod için yardıma ihtiyacım var.

kod çalışıyor fakat ben "googlebot" olan kısmı türetip tüm botlar için uygulamak istiyorum. kod şu şekilde;
if ($config['splash'] == '1' && !defined('_RADMIN') && !defined('_ADMIN') && !defined('_MOBILE') && !defined('_CLI')) {
if (!isset($_COOKIE['splash']) && !(strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false)) {
if (isset($_SERVER['REQUEST_URI'])) VRedirect::go($config['BASE_URL']. "/haber.php?kontrol=".$_SERVER['REQUEST_URI']);

}

}


internetten şöyle bir kod buldum ama bunu nasil uyguluyacağımı çözemedim yardım edebilecek arkadaşlar varmı rica etsem? :confused:


function find_spiders ($useragent = '')
{
if ($useragent=='') { $useragent = $_SERVER['HTTP_USER_AGENT']; }
$spider_name = '';
$spiders = array();
$spiders[] =array ('name'=>'AideRSS', 'useragent' => 'aiderss.com');
$spiders[] =array ('name'=>'Alexa', 'useragent' => 'ia_archiver');
$spiders[] =array ('name'=>'Altavista', 'useragent' => 'scooter');
$spiders[] =array ('name'=>'Archive.org', 'useragent' => 'is_archiver');
$spiders[] =array ('name'=>'Ask Jeeves', 'useragent' => 'ask jeeves');
$spiders[] =array ('name'=>'Ask.com/Teoma', 'useragent' => 'Jeeves/Teoma');
$spiders[] =array ('name'=>'Blogged', 'useragent' => 'blogged_crawl');
$spiders[] =array ('name'=>'Bloglines', 'useragent' => 'Bloglines');
$spiders[] =array ('name'=>'BlogPulse', 'useragent' => 'BlogPulse');
$spiders[] =array ('name'=>'BlogsNow', 'useragent' => 'BlogsNowBot');
$spiders[] =array ('name'=>'Bookmark Sync2it', 'useragent' => 'sync2it.com');
$spiders[] =array ('name'=>'DoCoMo', 'useragent' => 'DoCoMo');
$spiders[] =array ('name'=>'EnaBall', 'useragent' => 'EnaBot');
$spiders[] =array ('name'=>'Exabot', 'useragent' => 'Exabot');
$spiders[] =array ('name'=>'FeedBurner', 'useragent' => 'FeedBurner');
$spiders[] =array ('name'=>'Feedster', 'useragent' => 'Feedster');
$spiders[] =array ('name'=>'Gaisbot', 'useragent' => 'Gaisbot');
$spiders[] =array ('name'=>'Gigablast', 'useragent' => 'http://www.gigablast.com/spider.html');
$spiders[] =array ('name'=>'Gigabot', 'useragent' => 'Gigabot');
$spiders[] =array ('name'=>'GoogleBot', 'useragent' => 'google');
$spiders[] =array ('name'=>'Google AdSense', 'useragent' => 'Mediapartners-Google');
$spiders[] =array ('name'=>'Google FeedFetcher', 'useragent' => 'FeedFetcher-Google');
$spiders[] =array ('name'=>'Google Images', 'useragent' => 'Googlebot-Image');
$spiders[] =array ('name'=>'Google Labs', 'useragent' => 'Python-urllib');
$spiders[] =array ('name'=>'Google Mobile Spider', 'useragent' => 'Googlebot-Mobile');
$spiders[] =array ('name'=>'Google Sitemaps', 'useragent' => 'Google-Sitemaps/');
$spiders[] =array ('name'=>'Google Wireless Transcoder', 'useragent' => 'Google Wireless Transcoder');
$spiders[] =array ('name'=>'Grub crawler', 'useragent' => 'Grub.org crawler');
$spiders[] =array ('name'=>'Guruji', 'useragent' => 'GurujiBot');
$spiders[] =array ('name'=>'Hatena', 'useragent' => 'Hatena');
$spiders[] =array ('name'=>'Heritrix', 'useragent' => 'heritrix');
$spiders[] =array ('name'=>'Horizon', 'useragent' => 'Horizon');
$spiders[] =array ('name'=>'Hot Bot', 'useragent' => 'slurp@inktomi');
$spiders[] =array ('name'=>'Icerocket', 'useragent' => 'BlogSearch');
$spiders[] =array ('name'=>'Indy Library', 'useragent' => 'IndyLibrary');
$spiders[] =array ('name'=>'LarBin', 'useragent' => 'larbin_');
$spiders[] =array ('name'=>'LinkWalker', 'useragent' => 'LinkWalker');
$spiders[] =array ('name'=>'Livedoor', 'useragent' => 'livedoorScreenShot');
$spiders[] =array ('name'=>'LookSmart', 'useragent' => 'grub-client');
$spiders[] =array ('name'=>'Lycos', 'useragent' => 'lycos');
$spiders[] =array ('name'=>'McBot', 'useragent' => 'McBot');
$spiders[] =array ('name'=>'Megite', 'useragent' => 'Megite2.0');
$spiders[] =array ('name'=>'METASpider', 'useragent' => 'METASpider');
$spiders[] =array ('name'=>'Microsoft URL Control', 'useragent' => 'MicrosoftURLControl');
$spiders[] =array ('name'=>'Moreover', 'useragent' => 'Moreoverbot');
$spiders[] =array ('name'=>'MSN Mobile', 'useragent' => 'MSMOBOT');
$spiders[] =array ('name'=>'MSN Search', 'useragent' => 'msnbot');
$spiders[] =array ('name'=>'OrangeSpider', 'useragent' => 'OrangeSpider');
$spiders[] =array ('name'=>'picsearch', 'useragent' => 'www.picsearch.com');
$spiders[] =array ('name'=>'ScSpider', 'useragent' => 'ScSpider');
$spiders[] =array ('name'=>'searchme.com', 'useragent' => 'searchme.com');
$spiders[] =array ('name'=>'SimplePie', 'useragent' => 'SimplePie/');
$spiders[] =array ('name'=>'Snapbot', 'useragent' => 'Snap');
$spiders[] =array ('name'=>'Sosospider', 'useragent' => 'soso.com');
$spiders[] =array ('name'=>'Sphere', 'useragent' => 'SphereScout');
$spiders[] =array ('name'=>'Synoo', 'useragent' => 'Synoobot');
$spiders[] =array ('name'=>'Technorati', 'useragent' => 'Technoratibot');
$spiders[] =array ('name'=>'Twiceler', 'useragent' => 'Twiceler');
$spiders[] =array ('name'=>'UniversalFeedParser', 'useragent' => 'UniversalFeedParser/');
$spiders[] =array ('name'=>'vBSEO', 'useragent' => 'vBSEO');
$spiders[] =array ('name'=>'Voila', 'useragent' => 'VoilaBot');
$spiders[] =array ('name'=>'W3C Validator', 'useragent' => 'W3C_Validator');
$spiders[] =array ('name'=>'WebAlta', 'useragent' => 'WebAltaCrawler/');
$spiders[] =array ('name'=>'What You Seek', 'useragent' => 'whatuseek');
$spiders[] =array ('name'=>'xMind', 'useragent' => 'xMind');
$spiders[] =array ('name'=>'Yahoo Publisher Network', 'useragent' => 'YahooYSMcm');
$spiders[] =array ('name'=>'Yahoo! Blogs', 'useragent' => 'Yahoo-Blogs');
$spiders[] =array ('name'=>'Yahoo! FeedSeeker', 'useragent' => 'YahooFeedSeeker');
$spiders[] =array ('name'=>'Yahoo! Japan', 'useragent' => 'Y!J-');
$spiders[] =array ('name'=>'Yahoo! Vertical Crawler', 'useragent' => 'Yahoo-VerticalCrawler');
$spiders[] =array ('name'=>'Yahoo!', 'useragent' => 'MMCrawler');
$spiders[] =array ('name'=>'Yahoo!', 'useragent' => 'yahoo! slurp');
$spiders[] =array ('name'=>'Yandex', 'useragent' => 'yandex');
$spiders[] =array ('name'=>'YodaoBot', 'useragent' => 'YodaoBot');
foreach($spiders as $spider)
{
if(stripos(strtolower($useragent),strtolower($spider['useragent']))!==false)
{
$spider_name = $spider['name'];
}
}
unset ($spiders, $spider, $useragent);
if ($spider_name)
{
return $spider_name;
}
else
{
return false;
}
}
if ( find_spiders () )
{
echo "selam bot";
}