SkryptoMania.com - Darmowe skrypty PHP, Darmowe skrypty JavaScript, Darmowe szablony.

bet-at-home.com


Najprostszy rotator banerów Email
Tutorials

Najprostszy rotator banerów

Wyświetla losowo bannery zdefiniowane w tablicy

$width="400";//szerokość banera
$height="60";
//długość banera
//adresy
$adres = array("http://www.skryptomania.com",
"http://www.drugiadres.pl",
"http://www.trzeciadres.pl");
//adres do banera
$baner = array("http://www.
skryptomania.com/baner1.gif",
"http://www.drugiadres.pl/baner2.gif",
"http://www.trzeciadres.pl/grfika/baner3.gif");
//(alt)
$alt = array("WEB Pomocnik","Drugi Opis","Trzeci Opis");

srand(time());
$el = count($adres);
$r = (rand()%$el);
//wyświetlamy banerek

echo"<a href="/$adres[$r]" target='_blank'><img src=$baner[$r] alt="$alt[$r]" width="$width" height="$height" border="0"></a>";
?>

 

 
Valid XHTML & CSS | Template Design SkryptoMania | Copyright © 2009 by skryptomania.com