In my situation, I need a way to give any random visitor a unique identity. More Info - No membership system exist, therefore this problem arise - Ip address cannot be used to achieve this because most of them have dynamic ip - No matter what time or which day, he will be carrying the same unique identity as long he is using the same computer. Why I need the unique identity? - Track the user no matter what name he used when he post a message at my site Any way to do this? Thank you.
Yeah, thanks. I get it now. That will be part of what I need. Is there any other way out there? Thank you.
Here is the solution <?php session_start(); if(!isset($_SESSION['visitor'])) $_SESSION['visitor'] = md5(uniqid()); ?> <html> Dear Visitor, your unique ID is <b><?php echo $_SESSION['visitor']; ?></b> </html> Code (markup):
uniqid() is based on the current time. What I need was a unique identity that will not change no matter when the user surf my website, even 2 months later. Cookie is near to the solution I think, unless the user clears cookie. Thank you anyway.