The following piece of PHP code simply create captcha.
<?php
$chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
$res = "";
for ($i = 0; $i < 7; $i++)
{
$res .= $chars[mt_rand(0, strlen($chars)-1)];
}
echo $res;
?>
Try this code and taste the PHP.
<?php
$chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
$res = "";
for ($i = 0; $i < 7; $i++)
{
$res .= $chars[mt_rand(0, strlen($chars)-1)];
}
echo $res;
?>
Try this code and taste the PHP.
No comments:
Post a Comment