Online Shopping : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

22 of 59 people (37%) answered Yes
Recently 6 of 10 people (60%) answered Yes


How do I log an IP Address on site to protect against fradulant behaviour?

Feb 28th, 2007 15:38
Articles Way, Dave, John Barber,

This is a method to log IPs:
$ip = getenv("REMOTE_ADDR");
$log = "\n$ip";
$fa = fopen("login", "a");
$login = "$log";
fwrite($fa, $login);
Don't forget to chmod the file login to 777
i hope that helps.