perl/Cookie... basic question

Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2008
Posts: 102
Reputation: localp is an unknown quantity at this point 
Solved Threads: 2
localp localp is offline Offline
Junior Poster

perl/Cookie... basic question

 
0
  #1
Dec 4th, 2008
i want to create a perl /CGI program Cookie, where the username can be remembered even if the browser is shut down and restarted. i am new to Perl programming, and i have no clue from where to start on this, but i am aware on how to set cookies, but when the browser is quit the saved values disappear..

so will some one plzzz help me with a sample code i am lost
Local P ...
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: perl/Cookie... basic question

 
0
  #2
Dec 4th, 2008
Are you familiar with the CGI module? You can set and read cookies with the module. See the CGI documentation for details.

http://perldoc.perl.org/CGI.html#HTTP-COOKIES

There is also the CGI::Cookie module
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 102
Reputation: localp is an unknown quantity at this point 
Solved Threads: 2
localp localp is offline Offline
Junior Poster

Re: perl/Cookie... basic question

 
0
  #3
Dec 4th, 2008
Originally Posted by KevinADC View Post
Are you familiar with the CGI module? You can set and read cookies with the module. See the CGI documentation for details.

http://perldoc.perl.org/CGI.html#HTTP-COOKIES

There is also the CGI::Cookie module

i couldn't find any thing productive there..

wat i want to do is to create a perl persistent cookie ?? how do u code for this
Last edited by localp; Dec 4th, 2008 at 2:03 pm.
Local P ...
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: perl/Cookie... basic question

 
0
  #4
Dec 4th, 2008
There is no such thing as a perl cookie. On the server end they are generally refered to as sessions, on the client side, they are called cookies. But there is no such thing as a perl cookie so I am not sure what you are wanting to do.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 57
Reputation: mitchems is an unknown quantity at this point 
Solved Threads: 2
mitchems's Avatar
mitchems mitchems is offline Offline
Junior Poster in Training

Re: perl/Cookie... basic question

 
0
  #5
Feb 5th, 2009
Use an HTTP Cookie from the perl module mentioned above and set an expiration date into the future. That will store the cookie on the client's machine and it will retransmit it to your server. But storing the username is not a very secure solution.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Perl Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC