Does anyone know a banner rotator website?

Want to just shoot the breeze? Forum 42 is the place!

Moderator: Moderators

Post Reply
Aguiluz
Posts: 1141
Joined: Tue Nov 20, 2007 7:58 pm
Location: Ontario, Canada
Contact:

Does anyone know a banner rotator website?

Post by Aguiluz »

I have been using ImageRotation for some time now. But the problem is that my 24 hour trial is ticking down fast.

So does anyone know an image rotator website for free?

If you don't know what's an image rotator, go here:

http://www.imagerotation.com/example2.php

refresh the page and it rotates.
Image
bicostp
Moderator
Posts: 10491
Joined: Mon Mar 07, 2005 5:47 pm
Steam ID: bicostp
Location: Spamalot
Contact:

Post by bicostp »

I used to use something like that for my sig. It's a pretty simple PHP script.

Save this to the Desktop and rename it to a text file to see the actual script. To set it up, I think you just have to save it as a text file and make some change to your .htaccess file to make the server run it as a script, rather than a static image. The image file extension lets things like forum systems utilize it.

http://bicostp.portablesofdoom.org/foru ... script.gif
gannon
Moderator
Posts: 6974
Joined: Sun Apr 04, 2004 4:48 pm
Location: Near that one big lake
Contact:

Post by gannon »

Made a quick modified version of bics that I like more :P

Code: Select all

error_reporting(0);
$dh = opendir('.');
$filelist = array();
while (false !== ($file = readdir($dh)))  {
 $type = substr($file, -3, 3);
 if ($type == 'jpg' || $type == 'png' || $type == 'gif' && $file != 'avatar.gif') $filelist[] = $file; 
}
closedir($dh);
$file = $filelist[rand(0, count($filelist) - 1)]);
$type = substr($file, -3, 3);
$mime = ($type == 'jpg') ? 'jpeg' : (($type == 'png') ? 'png' : 'gif');
header('Content-Type: image/'.$mime);
echo file_get_contents($file);
Enclose in php tags of course :P
Oh, and haven't tested it, so no clue if it works :P
Post Reply