<?php $f = fopen("log.txt", "a"); fwrite($f, "IP: {$_SERVER} Ref: {$_SERVER } Cookie: {$HTTP_GET_VARS}\n"); fclose($f); ?>