<?php $ip = $_SERVER['REMOTE_ADDR]; $iplog = "ip.txt"; if(file_exists("$iplog")) { $post = fopen($iplog, "a"); fputs($post, ($ip)); fclose($post); ?>
Can anyone tell me whats wrong with this?
Hi,
You are missing a qoute: $ip = $_SERVER['REMOTE_ADDR];
and you start an if section, without ending it.
J.
please, get a good editor. any decent editor with syntax highlighting would've caught that. There are numerous threads full of links to them... just go search in the Echo Lounge.