|
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>"; ?>
|