Re: Can I get the IP address from a visitor?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lars Kristiansson wrote:

[..]

> My goal is to create purchase-orders written on unique files, and to
> separate them my idea was to baptize files with the IP addresses, which
> would ive each visitor an unique purchase-order...
> 
> Any hints to a newbie?

Yes. Do NOT use IP adresses as identifiers. Just forget about it.

People share connections, e.g. when they are in the same building or when 
they are using the same proxy. People use domestic/consumer internet 
connections that have dynamic IP addresses. Identifying people by their 
IP address is therefore stupid.

If it is just to have a key to some data, you could try using a GUID. And 
check when you generate one that it doesn't already exist (though the 
chance is extremely small, it is not zero). Or just use some serial 
number like everyone else does ;)

It may look boring to make files like order0001, order0002 etc. But it 
works.

Any reason you are not storing your orders in a database?


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux