Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 romping around the Monastery: (5)
As of 2024-12-05 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (36 votes). Check out past polls.