> -----Original Message-----
> From: Mariusz K [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 09, 2002 3:19 PM
> To: [EMAIL PROTECTED]
> Subject: session id
> 
> 
> Hi:)
> I want to be able to track the user as he goes from one pae 
> to another. I 
> heard that sessionID are used for that purpose. 

Yes. Typically the server generates an ID for the session and then arranges
for the browser to pass the ID back with each request via a cookie for via
additional information in each URL.

> I was trying 
> to find info on 
> the net about creating a sessionID with perl and didn't find 
> any articles 
> for biginners. Could anyone pls tell me how to create them or 
> where I could 
> find some information (webaddress)?

Start with the Apache::Session module on CPAN. Install it and read the
documentation. That may give you enough to get started. It basically takes
care of all the gory details for you.

> How do I generate one? Is it basically creating a random 
> number and assuming 
> that beacuse of the very low probability each generated 
> SessionID will be 
> unique? 

Pretty much, yes. After you install Apache::Session, enter the following
command to see how that module creates ID's:

   perldoc -m Apache::Session::Generate::MD5

> (then I would send a cookie with the sessionID and save the 
> sessionID to my DB at the same time, for later comparison - I guess?)

Yep. Apache::Session will help with the DB interface. You have to handle the
cookie yourself. Use the cookie handling features in the CGI module for
that.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to