Reply to thread

Create a text file and type in the following:[code]AddType application/x-httpd-php .gif[/code]Rename that text file as:[code].htaccess[/code]Create another text file and type in the following:[code]<?php


$URL1="signature_01.gif";

$URL2="signature_02.gif";

$URL3="signature_03.gif";

$URL4="signature_04.gif";


srand((double) microtime() * 1000);

$random = rand(1,4);


if($random == 1)

@header ("Location: $URL1");

elseif ($random == 2)

@header ("Location: $URL2");

elseif ($random == 3)

@header ("Location: $URL3");

elseif ($random == 4)

@header ("Location: $URL4");


?>[/code]The first section is for listing all images. The second part "rand(1,4)" is to match the number of images. For 6 images, replace "4" with "6". For the last section, add another "elseif" statements for additional images. After that's done, rename that text file to anything you want but with ".gif" at the end. For me, I usually change it to "signature.gif" and have all the other image files in the same directory as the randomizer file. :thumb:


Most operating systems won't allow files to be renamed like that so you may have to do it after uploading it online. :type:


Back
Top