diff --git a/ips/crawler.php b/ips/crawler.php index 1a8a34c..5f5cd13 100644 --- a/ips/crawler.php +++ b/ips/crawler.php @@ -24,4 +24,16 @@ $_ips_crawler = array ( '34.79.234.76', // google '148.251.120.201' // mj12bot ); +function checkHuman() { + global $_ips_crawler; + if (stripos ( $_SERVER ['HTTP_USER_AGENT'], 'bot' ) !== false) { + return false; + } + foreach ( $_ips_crawler as $np ) { + if (startsWith ( $_SERVER ['REMOTE_ADDR'], $np )) { + return false; + } + } + return true; +} ?> \ No newline at end of file