<?php $ip = $_SERVER['REMOTE_ADDR']; $open = fopen('ip.txt','a'); fwrite($open,$ip."\n"); fclose($open); ?>