diff --git a/one.php b/one.php index 7749f0e..49acd40 100644 --- a/one.php +++ b/one.php @@ -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'; }