Call us Toll-Free:
1-800-218-1525
Live ChatEmail us

 Sponsors

Email verifaction system

Code 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;
}
Enjoyed this post?

Subscribe Now to receive new posts via Email as soon as they come out.

 Comments
Post your comments












Note: No link spamming! If your message contains link/s, it will NOT be published on the site before manually approved by one of our moderators.



About Us  |  Contact us  |  Privacy Policy  |  Terms & Conditions