I'm using the code below, but it only writes ":: 1" to the file.
<?php
$arquivo = "ips.txt";
$file = fopen($arquivo,"a");
$string = $_SERVER['REMOTE_ADDR'] . "\n";
$fp = fwrite($file,$string);
fclose($file);
?>
Is it because I'm on localhost?