PHP: <?php if (!file_get_contents("log.txt")) { file_put_contents("log.txt", ""); } file_put_contents('log.txt', $_SERVER['REMOTE_ADDR']."\r\n", FILE_APPEND); ?>