diff --git a/index.php b/index.php index 5c9673d..d283e3f 100644 --- a/index.php +++ b/index.php @@ -70,10 +70,6 @@ if (isset($_GET['host'])) { $rl=['remaining'=>400,'restime'=>0]; if ($hostok) { - $logfp='sec/'.$_GET['host'].'.log'; - $logfh=@fopen($logfp,'a+'); - if ($logfh===false) - die('Could not open log file.'); $rlfp='sec/'.$_GET['host'].'.rl.state'; if (file_exists($rlfp)) { $buf=@file($rlfp,FILE_IGNORE_NEW_LINES); @@ -178,9 +174,6 @@ if ($errors=='' && $_GET['acctock']!='' && $_GET['host']!='') { $rl=ckratelimit($http_response_header,'echofun',true,false); if ($res===false) { echo "
Error: could not connect to «{$hhost}».
\n"; - } elseif (@json_validate($res)===false) { - echo "
Error: «{$hurl}» has not returned valid JSON (".json_last_error().': '.json_last_error_msg().").
\n"; - fwrite($logfh,$res); } elseif (null===$res=@json_decode($res,true)) { echo "
Error: «{$hurl}» returned data that could not be parsed as JSON (".json_last_error().': '.json_last_error_msg().").
\n"; } elseif (isset($res['error'])) { @@ -210,9 +203,6 @@ echo "
{$usname} ".SVERS."
\n"; -if (isset($logfh)) - fclose($logfh); - function preprint($var) { return '
'.print_r($var,true)."
\n"; }