Fixed bot detection.

This commit is contained in:
severak 2020-02-04 11:46:18 +01:00
parent 5995511ad2
commit 7309947a74
1 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,7 @@ try {
$path = $_GET['path'];
$width = $_GET['width'];
$isUnique = !empty($_GET['unique']) ? 1 : 0;
$isBot = smart_ip_detect_crawler($ua);
$isBot = smart_ip_detect_crawler($ua) ? 1 : 0;
$info = parse_user_agent($ua);
$data[':site_id'] = $site['id'];
@ -39,7 +39,9 @@ try {
echo 'OK';
} catch (Exception $exception) {
echo $exception->getMessage();
if ($config['debug']) {
echo $exception->getMessage();
}
echo 'FAIL';
}