View Single Post
  #1  
Old 2nd August 2022, 00:22
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Smile need for creating accounts for testing purposes
//https://www.codegrepper.com/code-examples/php/create+random+username+and+password+php
function rand_string( $length ) {
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ0123456789";
return substr(str_shuffle($chars),0,$length);
}


$emo1234 = rand_string(13);

//https://www.codegrepper.com/code-examples/php/create+random+username+and+password+php
function rand_passw0rd( $length ) {
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ0123456789";
return substr(str_shuffle($chars),0,$length);
}

$password1234 = rand_passw0rd(32); // length 32 password

Last edited by BamBam0077; 2nd August 2022 at 00:33.
Reply With Quote