Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
Email verifaction systemCode Wizard, 12-30-2006 |
Generates a 6-digit long verification string.
This is useful to verify users email addresses - email them a code generated using this function, and use it as a verifaction code or something similar. This will just generate random 6 digit strings, such as 381951 or 105812.
When someone signs up, enter this 6 digit into your database, and disable the account - email them the code, which they must enter into your website. If the code entered matches that stored in the database, then enable the account. This stops people signing up with false email addresses. Useful to use with my random password generator.
function GenPassword() {
srand((double)microtime()*1000000);
$rnd1 = rand(0, 9);
srand((double)microtime()*1000000);
$rnd2 = rand(0, 9);
srand((double)microtime()*1000000);
$rnd3 = rand(0, 9);
srand((double)microtime()*1000000);
$rnd4 = rand(0, 9);
srand((double)microtime()*1000000);
$rnd5 = rand(0, 9);
srand((double)microtime()*1000000);
$rnd6 = rand(0, 9);
$password = "$rnd1$rnd2$rnd3$rnd4$rnd5$rnd6";
return $password;
}
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments

