Fixed bot detection.
This commit is contained in:
parent
5995511ad2
commit
7309947a74
6
one.php
6
one.php
|
@ -21,7 +21,7 @@ try {
|
||||||
$path = $_GET['path'];
|
$path = $_GET['path'];
|
||||||
$width = $_GET['width'];
|
$width = $_GET['width'];
|
||||||
$isUnique = !empty($_GET['unique']) ? 1 : 0;
|
$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);
|
$info = parse_user_agent($ua);
|
||||||
|
|
||||||
$data[':site_id'] = $site['id'];
|
$data[':site_id'] = $site['id'];
|
||||||
|
@ -39,7 +39,9 @@ try {
|
||||||
|
|
||||||
echo 'OK';
|
echo 'OK';
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
echo $exception->getMessage();
|
if ($config['debug']) {
|
||||||
|
echo $exception->getMessage();
|
||||||
|
}
|
||||||
echo 'FAIL';
|
echo 'FAIL';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue