Page 1 of 1

I Need the IP?

Posted: Thu Apr 03, 2003 4:53 pm
by DuffMAn
Hi, I had this problem. I want to register every IP of the users accesing my site? gimme one example, no just the function? OK. Thx

I´ll be waiting ... here

Posted: Thu Apr 03, 2003 4:58 pm
by volka
http://www.php.net/manual/en/reserved.variables.php

Code: Select all

<?php
$fp = fopen('visitors.txt', 'a'); // storing it in a flat file?
fwrite($fp, $_SERVER['REMOTE_ADDR']."\r\n");
?>
maybe your provider offers server logs.

Posted: Thu Apr 03, 2003 8:08 pm
by DuffMAn
Thx, it works OK