Hi,

Not a good idea.

1. in the case of most dial-up users with an ISP, the IP address is usually
dynamically assigned, so next time they dial-up (or re-connect) they will
more than likely have a different IP address.

2. in the many cases of computers with a static IP (cable/ADSL/etc), the IP
address does not necessarily represent a "user"... think about shared
computers in families, in libraries, corporations, net cafe's, etc.

3. Data storage -- eeek! If you get 1000 visitors with upto 15 bytes
(nnn.nnn.nnn.nnn) each, that's 15k of IP address' you have to search through
constantly, without any real way to make it quicker (eg indexing).  That may
not sound so bad, but perhaps when you reach 30000 visitors, it's now upto
450k. Yuk.


Typically, return visitors are recognised with a cookie on the browser,
which definitely takes care of problem #3... of course it doesn't help with
problem #2 (shared computers).


Good luck,

Justin French


on 05/07/02 2:00 AM, Sebastian Marcu ([EMAIL PROTECTED]) wrote:

> Hi there,
> 
> I am new to PHP and need some help.
> I was wondering if there is a way to get hold of the IP address of a site
> visitor with PHP. I'm trying to develop an interaction where the server
> would recognise a new visitor from a returning visitor via the IP address.
> 
> Regards,
> 
> 
> Sebastian
> 
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to