Jump to content
Create New...

Rotating Signature Host


Recommended Posts

  • 1 month later...

Timely reply.. lol

 

Does that mean.. the place in the first post (clintonio) is the only place to do it.?

 

Does it take up a lot of space on a server.?

Hell, i could make a folder for people to use, if it doesn't take up too much room.

Link to comment
Share on other sites

This is a great tool for those of you who like to frequently change your sigs

 

 

Dont know how many of you are familiar with this concept, but its actually pretty cool for those of you who have access to some sort of web hosting.

 

Basically the concept is simple.. I'll explain it in laymans terms, then the coding will come later.

 

 

You basically create a directory online somewhere such as :

 

urgentfury.com/rotatingsig

 

in that directory you would upload the images that you would like to have in your rotation ( you could in theory have the images anywhere you'd like, but its easier for the code to have the images locally, rather that all across the internet (faster load times)

 

Along with the images, you would upload a small text file that basically does the work for you.

 

Once you have the code up, you essentially would insert your "CODE" like this into your sig, instead of having something like .jpg, .png, .gif

 

Code:

index.php

 

 

 

Now for the fun stuff

 

Step 1. Make a directory on your webserver, call it whatever you want.. (which is a subfolder.. but never mind that)

 

 

Step 2. Upload whatever images you want to have in your rotation to THAT directory

 

Step 3. Copy this code:

 

 Code:
 <?php

 $folder = '.';

 $extList = array();$extList['gif'] = 'image/gif';$extList['jpg'] = 'image/jpeg';$extList['jpeg'] =

 'image/jpeg';$extList['png'] = 'image/png';


 $img = null;if (substr($folder,-1) != '/') {$folder = $folder.'/';}if (isset($_GET['img'])) {$imageInfo =

 pathinfo($_GET['img']);if (isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&file_exists(

 $folder.$imageInfo['basename'] )) {$img = $folder.$imageInfo['basename'];}} else {$fileList = array();$handle =

 opendir($folder);while ( false !== ( $file = readdir($handle) ) ) {$file_info = pathinfo($file);if (isset(

 $extList[ strtolower( $file_info['extension'] ) ] )) {$fileList[] = $file;}}closedir($handle);if

 (count($fileList) > 0) {$imageNumber = time() % count($fileList);$img = $folder.$fileList[$imageNumber];}}if

 ($img!=null) {$imageInfo = pathinfo($img);$contentType = 'Content-type: '.$extList[ $imageInfo['extension']

 ];header ($contentType);readfile($img);} else {if ( function_exists('imagecreate') ) {header ("Content-type:

 image/png");$im = @imagecreate (100, 100)or die ("Cannot initialize new GD image stream");$background_color =

 imagecolorallocate ($im, 255, 255, 255);$text_color = imagecolorallocate ($im, 0,0,0);imagestring ($im, 2, 5,

 5, "IMAGE ERROR", $text_color);imagepng ($im);imagedestroy($im);}}?>

 

Step 4. Start notepad, and paste that code into notepad, and save it as "index.php"

 

Step 5. Upload "index.php" to the directory you created earlier

 

 

To test that it works simply type in the address in your browswer:

 

http://urgentfury.com/rotatingsig/index.php

 

if you see an image, refresh the page, and it should change automatically to another image that you have in that directory.

 

 

Step 6. Edit your sig in your forum profile to read:

 

Code:

index.php

 

 

 

 

Enjoy.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

Military including Active, Reserve, Veteran and Dependents get 50% off of our Spec Ops Premium Experience

×
×
  • Create New...

Important Information

By visiting this site you agree to our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Write what you are looking for and press enter or click the search icon to begin your search