function checkrobot($useragent = '') {
static $kw_spiders = array('bot', 'crawl', 'spider' ,'slurp', 'sohu-search', 'lycos', 'robozilla', 'Googlebot', 'Yandex', 'MSNBot', 'Slurp Yahoo! Slurp', 'Slurp', 'Teoma', 'Mail.Ru', 'WebAlta', 'StackRambler', 'ia_archiver', 'Googlebot/2.1', 'Googlebot/2.2', 'Googlebot/2.3','rambler','googlebot','aport','yahoo','msnbot','turtle','mail.ru','omsktele','yetibot','picsearch','sape.bot','sape_context','gigabot','snapbot','alexa.com','megadownload.net','askpeter.info','igde.ru','ask.com','qwartabot','yanga.co.uk','scoutjet','similarpages','oozbot','shrinktheweb.com','aboutusbot','followsite.com','dataparksearch','google-sitemaps','appEngine-google','feedfetcher-google','liveinternet.ru','xml-sitemaps.com','agama','metadatalabs.com','h1.hrn.ru','googlealert.com','seo-rus.com','yaDirectBot','yandeG','yandex','yandexSomething','Copyscape.com','AdsBot-Google','domaintools.com','Nigma.ru','bing.com','dotnetdotcom');
static $kw_browsers = array('msie', 'Chrome', 'Firefox', 'Safari', 'Opera','opera','Opera Mini','Netscape','Konqueror','SeaMonkey','Camino','Minefield','Icewease','K-Meleon', 'Maxthon', 'netscape', 'opera', 'konqueror', 'mozilla');
$useragent = strtolower(empty($useragent) ? $_SERVER['HTTP_USER_AGENT'] : $useragent);
if(strpos($useragent, '
Для просмотра ссылки Войди или Зарегистрируйся') === false && dstrpos($useragent, $kw_browsers)) return false;
if(dstrpos($useragent, $kw_spiders)) return true;
return false;
}