fusionballa
New Member
- Messages
- 34
- Reaction score
- 0
- Points
- 0
This tutorial will teach you how to rotate images. Good for affilate rotations =)
Code:
First of all create a file called something like randomimg.php.
Also make sure all the images you are using are in the same directory as randomimg.php.
Then copy and paste the code into your file.
<?php
header("Content-Type: image/gif");
$sigs = array();
$sigs[] = "imagename1.gif";
$sigs[] = "imagename2.gif";
$sigs[] = "imagename3.gif";
mt_srand((double)microtime()*1000000);
$sig = $sigs[mt_rand(0, count($sigs)-1)];
readfile($sig);
?>
Now add this code to the page you want the images to show up on, make sure it's extension is .php also.
<?php include("randomimage.php"); ?>