Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/02/2002, 00:14
KRYZTO
 
Fecha de Ingreso: enero-2002
Mensajes: 314
Antigüedad: 22 años, 3 meses
Puntos: 0
Re: Alguien sabe de un codigo rotabanners php?

<pre> &lt;?
$numbanners = 3 //numero de banners que se rotarán
$random = rand(1,$numbanners);
$img = array();
$url = array();
$txt = array();

$img[1] = &quot;archivos/banner1.gif&quot;;
$url[1] = &quot;http://www.enlace1.com&quot;;
$txt[1] = &quot;Visita el enlace del banner 1&quot;;

$img[2] = &quot;archivos/banner2.gif&quot;;
$url[2] = &quot;http://www.enlace2.com&quot;;
$txt[2] = &quot;Visita el enlace del banner 2&quot;;

$img[3] = &quot;archivos/banner3.gif&quot;;
$url[3] = &quot;http://www.enlace3.com&quot;;
$txt[3] = &quot;Visita el enlace del banner 3&quot;;

echo &quot;&lt;a href='$url[$random]' target='_blank'&gt;&lt;img src='$img[random]' alt='$txt[random]' border='0'&gt;&lt;/a&gt;&quot;;
?&gt;
</pre>

lo encontre por ahi espero te sirva :P