strikt types

This commit is contained in:
Troy Grunt
2026-02-15 14:45:02 +01:00
parent a093603c3c
commit cd031464e6
13 changed files with 77 additions and 69 deletions

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
$_ips_crawler = array (
'34.79.234.76', // google
'40.77.167.', // bing bot
@@ -28,7 +30,7 @@ $_ips_crawler = array (
'2a01:4f8:190:4244::2', // mj12bot
'2a01:4f8:162:43c5::2', // mj12bot
);
function checkHuman() {
function checkHuman(): bool {
global $_ips_crawler;
if (stripos ( $_SERVER ['HTTP_USER_AGENT'], 'bot' ) !== false || stripos ( $_SERVER ['HTTP_USER_AGENT'], 'crawler' ) !== false) {
return false;
@@ -40,4 +42,4 @@ function checkHuman() {
}
return true;
}
?>
?>