Log in

View Full Version : [Release] Roberts Ad Rotator / Image Rotator



Colin-Roberts
04-10-2007, 12:24 AM
Ye it's nothing special but i was bored and decided to make something in php.
Can rotate any number of ads or if you want to use it for images it's alot simpler you just make a folder with a_1 to a_10000 if you want and it will display them at random. i'll post the code for just the image rotator later.
http://colin-roberts.net/Ad.zip (http://colin-roberts.zip)

Verrou
04-10-2007, 04:45 AM
Preview?

Colin-Roberts
04-10-2007, 10:17 AM
I'll upload a preview after school

Eccentric
04-10-2007, 06:48 PM
works a treat well done

LegendOfNoob
04-10-2007, 10:22 PM
i know your work is good and you probally didnt mean to but


Script link is broken :s

Lysine
04-10-2007, 10:26 PM
http://colin-roberts.net/Ad.zip

Thats the link.

LegendOfNoob
04-10-2007, 10:33 PM
didnt work be4

Invent
04-10-2007, 10:37 PM
That scripts bigger than it needs to be:



<?php

$banner[0] = "banner1.png";
$banner[1] = "banner2.png";

$rand = rand(0, sizeof($banner));

echo("<img src=\"".$banner[$rand]."\" alt=\"\" />");


?>

Colin-Roberts
04-10-2007, 11:43 PM
Invent that would only work for Image rotatator not for advertisment rotator but thanks for posting that code.

LegendOfNoob
05-10-2007, 12:10 AM
hmm could do justa non linked ad

still though after i seen elsewhere invent is only the tip of th eiceberg for great scripts

Codex
05-10-2007, 07:02 AM
Just to edit Invent's script.


<?php

$banner[0] = "http://habbuzz.net/site/images/part/forum.gif"; // Change these to what your image is
$banner[1] = "http://habbuzz.net/site/images/part/jobs.gif";
$url[0] = "http://www.habbox.com/"; // Change these to what your link is
$url[1] = "http://www.habboxforum.com/";

$rand = rand(0, 1); //Change the 1 for how many banners there are above - now is 1

echo("<a href='".$url[$rand]."' alt='Image Rotator' border='0' target='_blank'><img src=\"".$banner[$rand]."\" alt=\"\" border=\"0\" /></a>");


?>

Flisker
05-10-2007, 03:39 PM
then maybe add some AJAX content update to make it change xD

Want to hide these adverts? Register an account for free!