I use sessions combinded with utc
function mtime()
{
$mtime = microtime();
$mtime = ereg_replace('\.', '', $mtime);
$mtime = explode(' ', $mtime);
$mtime = $mtime[1] . $mtime[0];
return($mtime);
}
will ALLWAYS return a unique number, store this number in a session, each
user gets assigned a sessionID now each user has their own number, 100%
unique to themselves. this is how I seperate my users. Ive built quite a few
cart systems with this aproch. I store the cart right in the sessions, but I
have also set systems up where the cart is right in the db. I did the later
because a client wanted to have a way to see the % of users that put things
in their cart and never purchased, and % of products purchased to %
abandonded in their cart.
Your right on the IP system, here in the office I share the same IP with 12
people throught a NAT.
I dont know if you need to use an IP at all, if this is just for a cart...
then big deal, some script kiddy could try 36^32 possible combinations of a
PHPSESSID to try and hijack their cart ! haha. maybe for a something a
little more secure.
Chris Lee
Mediawaveonline.com
"Brandon Orther" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I am making a shopping cart. I am wondering on how I should separate each
> user. I though the I.P. would be good but there can be a couple people on
> one I.P. so if someone is sharing an I.P. it will mess things up.. Anyone
> got a better way to do it?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]