SunQuest
           Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old August 12th, 2000, 09:22 PM
CujoRbd CujoRbd is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 16 CujoRbd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0


how do you use Perl to write out cookies.
I've got it down in JavaScript, but I'd like to switch it to server-side, and I'm already using perl, so it seems most logical here.

are there any references or tutorials on the web maybe?


THANKS!!!


CujoRbd



Reply With Quote
  #2  
Old August 13th, 2000, 06:00 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
There are many ways to use it. You can use CGI.pm or try HTTP:Cookies from -> http://www.perl.com/CPAN-local/modules/by-module/HTTP/libwww-perl-5.48.tar.gz

Extract it and read Cookies.pm in HTTP directory.

Reply With Quote
  #3  
Old August 14th, 2000, 08:20 AM
goBoating goBoating is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Charleston, SC, USA
Posts: 10 goBoating User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
A simple example using CGI.pm....

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
#!/usr/local/bin/perl
use CGI;

# change the next line to your cgi-bin dir.
$thisCGI = '/cgi-bin/examples/setCookie';
$query = new CGI;

$cookThis = $query->cookie(-name=>'cookThis');
if ($cookThis)
{
$cookie = $query->cookie(-name=>"cookThis",
-value=>'',
-expires=>"+1h");
}
else
{
$cookie = $query->cookie(-name=>"cookThis",
-value=>"Netscape Version",
-expires=>"+1h");
}

print $query->header(-cookie=>$cookie);
print "<BR>CookThis is $cookThis<BR>";
print $query->start_html(-title=>"UPLOAD THIS");
print $query ->start_multipart_form('POST',"$thisCGI");
print '<BR>',$query->submit('doWhat','cook');
print $query->end_form;
print $query->end_html;
[/code]

'hope this helps...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > cookies??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway