axilant
Account Closed
- Impact
- 28
This is a function say your making a signup script and you want them to have a activation code or something. Its pretty usefull, only edit the function if you know what you are doing!!! It can actually mess up and might not give a good output.
PHP:
function make_serial($string)
{
$md5 = md5($string);
$split = str_split($md5, 4);
foreach($split AS $tmp)
{
$serial .= "$tmp-";
}
$tmp = substr($serial, 0, 39);
return $tmp;
}
//usage:
$string = "axilant"; //might want to encrypt there username or something, you can deside that :)
$serial = make_serial($string);