prova così:
Codice PHP:
<?php
   $handle
=fopen('ips.txt''a');
   
fwrite($handle$_SERVER['REMOTE_ADDR']."|");
   
fclose($handle);
?>
n.b.
il file ips.txt deve già esistere