Mostrar imagem ou banner randomico

srand( microtime() * 1000000);
$advertise = rand(1,3);
//After the rand decided how many youve got and the first and last number e.g got 3, 1,3
switch($advertise)
//you can add more just use the same format
{
case
1 : $banner=“site 1 image url”; $url=“site one address”; $height=“height”; $width=“width”; break;
case
2 : $banner=“site 2 image url”; $url=“site two address”; $height=“height”; $width=“width”; break;
case
3 : $banner=“site 3 image url”; $url=“site 3 address”; $height=“height”; $width=“width”; break;
}
$display = ;
$display.= ;
$display.= “width=\”$width\” height=\”$height\” border=\”0\” >”;
$display.=
;
echo(
$display);
?>

Ate mais pessoal...


Postagens Relacionadas
Anterior
« Anterior
Proxima
Proxima »