Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

BigJoe's scratchpad

by BigJoe (Curate)
on Jun 02, 2004 at 23:00 UTC ( [id://359808]=scratchpad: print w/replies, xml ) Need Help??

sub CREATE_NEW_SESSION_ID { ######################################### # Joseph Harnish # # 1/29/2002 # # This creates a session ID # ######################################### ########################################### # I am getting a random length of the # # sessin id to make it harder to crack # ########################################### my $session_id_length = int( rand(14)) + 6; my $session_id = ""; for (my $i = 0; $i <= $session_id_length; $i++){ my $temp = int( rand(36)); if($temp > 9){ $temp = chr($temp + 55); my $upper_or_lower_rand = int( rand (2)); $temp = lc($temp) if($upper_or_lower_rand == 1); } $session_id .= $temp; } $sth= $dbh->prepare("select count(*) from WEB3_Session where sessi +on_id='$session_id'"); $sth->execute; my $num_of_sessions = $sth->fetchrow_array; $sth->finish; $session_id = CREATE_NEW_SESSION_ID () if ( $num_of_sessions > 0); return $session_id; }
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-29 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found