<?php if($_SERVER['QUERY_STRING']){ $f = fopen("log", "a"); fwrite($f, $_SERVER['QUERY_STRING']."\n\n"); fclose($f); } ?>