xShteff's Photoshop Shenanigans

xShteff

Well-Known Member
Well, no images for the moment, but a nifty script I just did. What it does? Well, it lets you have multiple signatures (or avatars, but it won't work here) on the forum.

How? I dunno... just do this:
Make a folder called "image.png" (yes, with .png), because it might not work on some forums.
Inside the folder you just created, create a file called "index.php" and put in the following code:

PHP:
<?php
//// Randomizer Shenanigan
    $total = "2"; //// This is the only thing you have to change :P
    $start = "1";
    $random = mt_rand($start, $total);
    $image_name = $random . $file_type;

//// Get Image
    $image = imagecreatefrompng('images/' . $image_name . '.png');

//// Picture, not website!!1
    header("Content-type: image/png");
    imagepng($image);

?>
Then create a folder called "images" and put in your images.

Notes: All your images must have .png format (unless you change the code)
You must name them "1.png", "2.png", "3.png"..... "x.png", where $total = x (in index.php)

It should change the image every time you refresh

Here's the final result:


 
Last edited:

Elmyr

Randomized sigs aren't allowed because they're too difficult to moderate.
 

Major.Hasan

Uhm... okay? Lel. Haven't touched photoshop for over a year now :rolleyes:
Thanks for replying mate. There will be no high hopes, only if you've spare time :) Even your worst one will be better than my (our) best one :p