Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookie naming convention

Status
Not open for further replies.

RPrinceton

Programmer
Jan 8, 2003
86
US
Hi Everyone,
I am not sure this is the correct forum for this question but I need to start somewhere. I am creating a cookie from CGI, the content of which is irrelavent. On my home PC
I can see three cookies named rcp6250@cgi-bin[1].txt,
rcp6250@cgi-bin[2].txt and rcp6250@cgi-bin[3].txt. The one named rcp6250@cgi-bin[3].txt is the one I created. It appears that the operating system "bumps" up an index to make the cookie name (file name) unique. I want to trigger a job on my PC when only MY cookie is created. I have the triggering software installed that triggers off of a file name. My question is how, when creating a cookie, can I assure a specific file name e.g., rcp6250@mycookie.txt so that I can I won't collide with other cookies? I hope this is clear. Please advise. Thx in advance.
Regards,
RPrinceton
 
Code:
#!/usr/bin/perl

use CGI; # Use the cgi module to create the cookie
my $GET = new CGI; #Assign $GET as variable to use the CGI module


#Set the cookies values
my $cookie_out = $GET->cookie(-name=>'YOURCOOKIENAME',-value=>"COOKIE TEXT",-expires=>'+3h',-path=>'/',-domain=>'.yourdomain.com.com',-secure=>0);

#create the cookie named "YOURCOOKIENAME"
print $GET->header(-cookie=>$cookie_out);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top