Rotation bannieres pub en html
Résolu/Fermé
A voir également:
- Rotation bannieres pub en html
- Youtube sans pub - Accueil - Streaming
- Rotation ecran windows - Guide
- Netflix avec pub avis - Accueil - Streaming
- Rotation video - Guide
- Editeur html - Télécharger - HTML
2 réponses
MastercroW
Messages postés
1094
Date d'inscription
dimanche 3 octobre 2010
Statut
Membre
Dernière intervention
31 mai 2019
163
26 déc. 2010 à 18:11
26 déc. 2010 à 18:11
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.
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>'; ?>