Code: Select all
//
// Username and IP Logging
//
$dt = date("j-F-Y H:i:s");
$fp = fopen("IPlog.txt", "a+");
$ip = $_SERVER['REMOTE_ADDR'];
$username = WHAT DO I PUT HERE????
$mg = "$dt $username From IP address $ip\n";
fwrite($fp, "$mg\r\n");
// change the above line to fwrite($fp, "$mg\n\n"); for unix
// or leave as-is for Windows
fclose($fp);
//Would appreciate it so much in advance.
If you cannot understand, please let me know. English is my second language!