39 lines
No EOL
689 B
PHP
39 lines
No EOL
689 B
PHP
<?php
|
|
|
|
echo hexdec(substr(md5("alpha"),0,6));
|
|
echo "\n";
|
|
|
|
srand(hexdec(substr(md5("alpha"),0,6)));
|
|
|
|
$parts = array(
|
|
'body' => rand(1,15),
|
|
'fur' => rand(1,10),
|
|
'eyes' => rand(1,15),
|
|
'mouth' => rand(1,10),
|
|
'accessorie' => rand(1,20)
|
|
);
|
|
|
|
// add parts
|
|
foreach($parts as $part => $num)
|
|
{
|
|
echo "$num ";
|
|
}
|
|
echo "\n";
|
|
|
|
$parts = array(
|
|
'body' => rand(0,14)+1,
|
|
'fur' => rand(0,9)+1,
|
|
'eyes' => rand(0,14)+1,
|
|
'mouth' => rand(0,9)+1,
|
|
'accessorie' => rand(0,19)+1
|
|
);
|
|
|
|
// add parts
|
|
foreach($parts as $part => $num)
|
|
{
|
|
echo "$num ";
|
|
}
|
|
echo "\n";
|
|
|
|
|
|
?>
|