Rotation bannieres pub en html

Résolu
deejays -  
 deejays -
Bonjour,
je recherche un script en html simple pour faire une variation de mes bannières de pub toutes les 25sec.
merci de votre aide.



A voir également:

2 réponses

MastercroW Messages postés 1094 Date d'inscription   Statut Membre Dernière intervention   163
 
Bonsoir,
J'ai trouvé un script en PHP plutôt sympa sur internet, j'espère que cela vas t'être utile. Par contre sa ne varie pas toute les 25 secondes, mais à chaque rafraîchissement. Ce qui est tout autant sympa.
<?php
 
/****************************************************
    Tableau associatif des bannieres et banniere choisie
*****************************************************/
$tabBannieres = array(
 
    1 => array('http://www.site1.com','1.png','Description  1'),
    2 => array('http://www.site2.com','2.png','Description 2'),
    3 => array('http://www.site3.com','3.png','Description 3')
);
 
/****************************************************
    Détermination de la banniere à afficher
*****************************************************/
$choix = 1;
$choix = array_rand($tabBannieres, 1);
 
/****************************************************
    Affichage des bannieres
*****************************************************/
echo '<a href="', $tabBannieres[$choix][0] ,'" title="', $tabBannieres[$choix][2] ,'">';
echo '<img src="', $tabBannieres[$choix][1] ,'" alt="', $tabBannieres[$choix][2] ,'" />';
echo '</a>';
 
?>

0
deejays
 
merci MastercroW sa me conviens bien ce script
0