hey all trying to make a simple ip logger that writes to a txt file ive double checked permissions and that isnt a problem
$log_file = "/var/www/html/ip.txt";
$ip = getenv('REMOTE_ADDR');
$fp = fopen("$log_file", "a");
fputs($fp, "$iprn");
flock($fp, 3);
fclose($fp);
echo 'Your Ip was logged '.$ip;
its nothing complicated just a starting point
is there anything there stopping it from logging?
many thanks