Hi,
I've tried it on my machine and it worked fine. Anyway, try this one:
<?php
srand((double)microtime()*1000000);
$red = rand(0, 255);
$hexred = dechex($red);
if ($red < 16)
{
$hexred = "0".$hexred;
}
srand((double)microtime()*1000000);
$green = rand(0, 255);
$hexgreen = dechex($green);
if ($green < 16)
{
$hexgreen = "0".$hexgreen;
}
srand((double)microtime()*1000000);
$blue = rand(0, 255);
$hexblue = dechex($blue);
if ($blue < 16)
{
$hexblue = "0".$hexblue;
}
$colorcode = $hexred.$hexgreen.$hexblue;
echo $colorcode;
?>
Cheers, Markus