d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Graphic Design > Signature Rotator > Where?
Add Reply New Topic New Poll
Member
Posts: 7,764
Joined: Nov 10 2009
Gold: Locked
Trader: Scammer
Warn: 30%
Jan 26 2010 05:19pm
iso :D
Member
Posts: 22,964
Joined: May 31 2007
Gold: 184.35
Jan 26 2010 05:21pm
Learn to google you dimwit.
Member
Posts: 3,545
Joined: Jun 24 2008
Gold: Locked
Warn: 10%
Jan 26 2010 05:22pm
Reading the following:

Quote (IchigoKurosaki @ Nov 30 2008 12:54pm)
How to set up a Image/Signature Rotator
by IchigoKurosaki

General 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.png
Yes, 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.txt
Now 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.php

Step 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 icon_pointr.gif 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 icon_pointr.gif a variable that will be the listing of your URL's in your url.txt File
    // icon_pointr.gif indicates a comment in the script
  • $rotate icon_pointr.gif will be hte link which will be replaced every time with yourdomain.com/signature.png
  • readfile icon_pointr.gif executes the script
  • ?> icon_pointr.gif 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:

Codehttp://yourdomain.com/signature.png

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


Consult the general help sticky in the future:
http://forums.d2jsp.org/topic.php?t=21823158&f=34

Post in the following forum if you find yourself in need of an answer: (general help)
http://forums.d2jsp.org/forum.php?f=34

This post was edited by Hashirama on Jan 26 2010 05:23pm
Member
Posts: 7,764
Joined: Nov 10 2009
Gold: Locked
Trader: Scammer
Warn: 30%
Jan 26 2010 05:27pm
hmm^^

This post was edited by BornFromPain on Jan 26 2010 05:28pm
Member
Posts: 27,585
Joined: Feb 15 2004
Gold: 15.13
Jan 27 2010 04:39pm
Quote (Toddler @ Jan 26 2010 06:21pm)
Learn to google you dimwit.


Nice 10% bro
Go Back To Graphic Design Topic List
Add Reply New Topic New Poll