Forum Moderators: coopster & phranque

Message Too Old, No Replies

Creating a unique session ID

session ID unique

         

cheekykevwalker

9:15 pm on Apr 22, 2003 (gmt 0)

10+ Year Member



I am making a small web application and am a beginner to using perl. I need to create a unique session ID for when a user has logged into my application which is to be passed around the pages while the user is logged in. Can anyone give me any pointers on how to do this? Thanks in advance. Kev :)

DrDoc

9:49 am on Apr 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

There are several ways you could do this. You could take the current timestamp and create am MD5 hash... or, to ensure that it will be even more unique, concatenate the visitor's IP and the current Unix timestamp.

That should give you unique id's...

cheekykevwalker

10:03 am on Apr 23, 2003 (gmt 0)

10+ Year Member



Ok thanks for that, I also have three more questions if you dont mind.Sorry if they are pretty simple. Firstly I wish to print a username to a file, is their an ENV variable that holds this info? I am also printing out a list of user processes and need to have it print out in formatted HTML, at the moment it is all printing out in a long list. And finally do you know what the flag is for listing group processes? Thanks alot. Kev