// Trying to catch scraper bots $log = [ 'ts' => gmdate('c'), 'ip' => $_SERVER['REMOTE_ADDR'] ?? '', 'ua' => $_SERVER['HTTP_USER_AGENT'] ?? '', 'referer' => $_SERVER['HTTP_REFERER'] ?? '', 'accept_lang' => $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '', 'url' => $_SERVER['REQUEST_URI'] ?? '' ]; file_put_contents('/var/log/honeypot.log', json_encode($log).PHP_EOL, FILE_APPEND); header('Content-Type: text/plain; charset=utf-8'); echo "Site maintenance file\n";