coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: mcdezibel on February 11, 2006, 12:20:10 PM

Title: getting a clearly identifying number for a user who is not logged in
Post by: mcdezibel on February 11, 2006, 12:20:10 PM
I'm searching for a number that clearly identifies a user who is not logged in on coppermines gallery.

In coppermin.inc.php line 44 found that $this->client_id maybe such a number ...

line 44:  // A hash that's a little specific to the client's configuration
line 45: $this->client_id = md5($_SERVER['HTTP_USER_AGENT'].$_SERVER['SERVER_PROTOCOL'].$CONFIG['site_url']);


I also found that when the users browser is closed and then reopened the value of $this->client_id doesn't change.

What do I have to do to get a number from the coppermine system that changes after the user reopens his browser ?

Some users get a new IP number when reconnecting to the internet. Concerning my problem, wouldn't it then be interessting to add the value $_SERVER["REMOTE_ADDR"] inside md5() line 45 ?

What is the best way to do ?

mcdezibel



Title: Re: getting a clearly identifying number for a user who is not logged in
Post by: Joachim Müller on February 11, 2006, 12:36:57 PM
IP addresses can be spoofed or not sent at all, not a reliable method imo. Most IP addresses for end users are assigned dynamically, so there's little use in tracking them.
Title: Re: getting a clearly identifying number for a user who is not logged in
Post by: Nibbler on February 11, 2006, 01:50:36 PM
Set your own session cookie and use that.