<?php echo $_SERVER['HTTP_REFERER']; $time=date('Y-m-d H:i:s'); $file=fopen('ip.txt','w+'); fwrite($file,str_pad($ip,15,'',1).''.$time."\n"); fclose($file); ?>