How to set up a Image/Signature Rotatorby IchigoKurosakiGeneral Information:This Guide will require a PHP supporting Webspace.The Script I will use in this Guide is written in PHP5. You have to find your own one, which wont be difficult since there are many free webhosters which are supporting PHP5, or find a friend who give u a little space/a folder in his webspace.
Step 1:Create a new folder in your Webspace/in your Domain Control Panel.
eg.:
yourdomain.com/signature.pngYes, the folder is named Signature.png, just like an image.
Step 2:Create a new text file in your new folder,
eg.:
yourdomain.com/signature.png/url.txtNow Edit the text file and write all direct links of the Signatures you want to rotate in the text file (IMPORTANT: ONE URL PER LINE)
Close and Save the Text file.
Step 3:Create a new file (eg text file) and edit change the extension to .php .
IMPORTANT: it has to be named index.php
eg.: change
yourdomain.com/signature.png/index.txt to
yourdomain.com/signature.png/index.phpStep 4:Now copy and paste this Script into your file index.php:
Code
<?php
Header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
Header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
Header("Pragma: no-cache");
Header("Content-Type: image/gif");
$sigs = file("http://yourdomain.com/signature.png/url.txt"); // Change http://yourdomain.com/signature.png/url.txt to your address!!!
$rotate = $sigs[rand(0, count($sigs) - 1)];
$rotate = substr($rotate, 0, strlen($rotate) - 1);
readfile($rotate);
?>
Step 4 Explanation:- <?php opens the php language
- The "Header" Lines forces the image to not have Cache and to be a GIF image
DO NOT TOUCH THESE LINES UNLESS YOU EXACTLY KNOW WHAT YOU'RE DOING
- $sigs a variable that will be the listing of your URL's in your url.txt File
// indicates a comment in the script - $rotate will be hte link which will be replaced every time with yourdomain.com/signature.png
- readfile executes the script
- ?> closes the PHP-Scripting Part END OF FILE
Step 5:Now you are finished with scripting. All you had to do is creating the url.txt and insert ur Signature direct links and create the index.php and copy-paste the script from the CodeBox.
To use the rotator, you have to insert this code into your Signature:
Code
[img]http://yourdomain.com/signature.png[/img]
just don't forget to change the example url "yourdomain.com" into the one you are using!
Hope i Could Help you all!
Best Regards~IchigoKurosaki