I would have done it like this.
(Not tested)
HalfaBee
<?php
function head(){
$header = "header.php";
include($header);
return true;
}
function foot(){
$footer = "footer.php";
$inc = include($footer);
return true;
}
$array = array('a','b','c','d','e','f','g','h','i','j','k',
'l','m','n','o','p','q','r','s','t','u','v','w','x
','y','z',
'0','1','2','3','4','5','6','7','8','9');
head();
for( $i=0;$i<26;$i++ )
$pass .= $array[rand(0,count($array))];
echo $pass;
$pass = md5( $pass )
echo $pass;
foot();
?>