Janek Schleicher wrote at Tue, 09 Jul 2002 18:48:00 +0200:
> rand($#chars) gives a random
> number in the range of 0 .. $#chars-1
Sorry not completely correct,
rand($#chars) gives a random number < $#chars,
what is in chars[ rand($#chars) ] implicitly rounded down.
However, the last element of
jffusion wrote at Tue, 09 Jul 2002 17:33:35 +0200:
> Hi
>
> I have my script to generate a random username and password and print it in the
>browser window
>
> print 'Username: ', random_string(), "\n";
> print 'Password: ', random_string(), "\n";
>
> sub random_string {
>
> my($string) =
From: [EMAIL PROTECTED]
> Now I need to define the username and password generated so that they
> are written to the htaccess, htpasswd, and members.db file
>
> here is the script
>
> # everything ok, let's write to database and send welcome email
> open (DATABASE, ">>$databas
On Jul 9, [EMAIL PROTECTED] said:
>print 'Username: ', random_string(), "\n";
>print 'Password: ', random_string(), "\n";
>
[snip]
>
># everything ok, let's write to database and send welcome email
>open (DATABASE, ">>$database");
>flock (DATABASE, 2);
>print DATABASE "$username|$password\n";
>fl
Hi
I have my script to generate a random username and password
and print it in the browser window
Now I need to define the username and password generated so that they are
written to the htaccess, htpasswd, and members.db file
here is the script
# Here we define the variables
$htpasswd = 'c:\a