Its very easy to make a random password generator in PHP.
$password = substr(md5(time()), 0, rand(4,8));
I got above code from Binyva's Blog
Four functions used here substr() md5() time() and rand()
If you wanna know about this functions please refer w3schools