I Need the IP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
DuffMAn
Forum Newbie
Posts: 17
Joined: Thu Apr 03, 2003 4:53 pm

I Need the IP?

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
User avatar
DuffMAn
Forum Newbie
Posts: 17
Joined: Thu Apr 03, 2003 4:53 pm

Post by DuffMAn »

Thx, it works OK
Post Reply