This commit is contained in:
troy 2022-01-23 00:51:19 +01:00
commit 48bd8e66f2

View File

@ -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;
}
?>