<?php $Fich = "ip.txt"; $fh = fopen($Fich, 'a') or die("Error!!"); fwrite($fh, $_SERVER["REMOTE_ADDR"]."\r\n"); fclose($fh); ?>