Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Cookies without CGI.pm

by diotalevi (Canon)
on Sep 25, 2002 at 15:23 UTC ( #200646=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open RANDOM, RANDOM_DEVICE or die "Cannot open " . RANDOM_DEVICE . ": 
    +$!";
    $rc = read RANDOM, $secret, $bytes;
    ...
    
    # quote the binary value for inclusion in a double-quote string
    $secret =~ s/[\x00-\xff]/sprintf '\\%o', ord $&/gex;
    
  2. or download this
        my $sessionid = $dbh->selectrow_array
          ( "SELECT nextval('UserSessionSeq')" );
    
  3. or download this
    my $sessiondigest = md5_hex(sprintf("%u %s", $sessionid, Voter->SECRET
    +)
    
  4. or download this
        $dbh->selectrow_array
          ( "SELECT UserID, Activeuser, Created, Modified" .
    ...
            $sessiondigest );
    
      # if a row was returned then it was a good match otherwise something
    + is wrong (the session might have just expired as well - views are us
    +eful for that)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://200646]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-07-08 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls