// Das ist ein Test $props = array( 'REMOTE_ADDR', 'REMOTE_HOST', 'HTTP_USER_AGENT', 'SERVER_PORT', 'QUERY_STRING', 'HTTP_REFERER' ); $log = array('evil', date(DATE_ATOM)); foreach ($props as $prop) { $entry = array_key_exists($prop, $_SERVER)? $_SERVER[$prop] : ''; array_push($log, $entry); } file_put_contents('bot.log', join("\t", $log) . "\n", FILE_APPEND);