Fw: [PHP-DB] tracking users...

From: Date: Mon, 21 Jan 2002 22:50:45 +0000
Subject: Fw: [PHP-DB] tracking users...
Groups: php.db 
Request: Send a blank email to php-db+get-16033@lists.php.net to get a copy of this message
jas: > ----- Original Message ----- > From: "jas" <jlgerfen@hotmail.com> > To: <php-db@lists.php.net> > Sent: Monday, January 21, 2002 10:50 PM > Subject: [PHP-DB] tracking users... > I am fairly new to PHP and have setup a site that connects to a MySQL db to > store different information from our users, however what I would like to > setup is something that I could place on a few pages to track users for > demographic purposes. What I need to do is as a page is visited I need to > generate a random alpha numeric identifier to be used as a session variable > for a cookie and also have that cookie's information be placed into a MySQL > database for later retrieval. If anyone has a good resource tutorial on > this type of function I would greatly appriciate it. Oh and yes I have done > quite a bit of research on php.net on both the session() and the setcookie() > functions. =) Thanks again. Jas So I supose the problem is getting a random alpha numeric identifier , am i right? If so, what are the specifications of that identifier? Right now, the use of crypt/dcrypt function comes to my mind, but then you would need to use the mecrypt library. If you don't need something that sofisticated try generating a random number and then use char() and ord() to retreive the info. hope this will help you, andrés >

« previous php.db (#16033) next »