<?php $log="log.txt"; $file = fopen ($log, "a+"); $qu=UrlDecode(getenv(*QUERY_STRING*)); $ref=UrlDecode(getenv(*HTTP_REFERER*)); $ip=getenv(*REMOTE_ADDR*); $now = getdate(); $nowstring=$now[*mday*].".".$now[*mon*].".".$now[*year*]." ".$now[*hours*].":".$now[*minutes*].":".$now[*seconds*]; $str="[$nowstring] IP=$ip REFERER=$ref QUERY=$qu ||\n"; fputs ($file, $str); fclose($file); header(*Location: image.gif*); ?>