"no", "agent" => htmlspecialchars($testagent)]); } else { echo "no"; } } else { if ($json == '1') { echo json_encode(["status" => "ok", "agent" => htmlspecialchars($testagent)]); } else { echo "ok"; } } function ellenorzes($string) { if ($string == null || $string == "") { return true; } $botslist = file_get_contents('user-agents_bot-crawler.txt'); $botarray = explode("\n", $botslist); for ($i=0; $i < count($botarray); $i++) { if (strpos($botarray[$i], $string) !== false) { return true; } } return false; } sleep($sleep); ?>