Random Signature
Posted: Sat Jul 25, 2015 1:44 pm
So for a while now i have been thinking about how to go about making a signature that changes like pri's but customizable in the sense of choosing the images and etc. After searching around on the web i managed to do it and thought that i would share it.
So first thing first is to find your pictures, you can have any number but make sure they are all the same file type.(It wont work otherwise. you can always safely change the file extention of a static image such as jpg or png)
Afterwards write this code into notepad:
Now make sure that you have the same number of lines as you do images, you can just copy-paste some of it over to make more lines. Secondly change the 8 in "$display = rand(1, 8); " to be whatever the number of images you have are. Lastly make sure that the jpeg in "header("Content-type: image/jpeg"); " is your picture's file type, and make sure to add the extentions in the file names. Replace the "#.jpeg" with your file name. Make sure to save this as a php file, you can name it anything
Next get a FTP server running. It could be free, hosted, paid, or etc but make sure you have one. I used https://www.olympe.in since it was one of the first ones i found. (If you use the olympe.in site, it sends you a conformation email which you need to click before you register and actual name and password. Following make sure to create a Site in the Site tab. Remember the username and password that you use for the site, its important.)
After you get it running download a FTP client, i use Filezilla, but use whatever you prefer and login to the FTP server. (If you used olympe.in then use the following: Host: ftp.olympe.in User: 'your websites name' Password: 'Site password' Port: 21) After logging into the FTP server make a folder (you can name it anything) in the root of your FTP server. Then inside the folder place all of your images and the php file, then let them completely transfer(this could take some time depending on your network or FTP server)
Following this come onto the forums and go to your User Control Panel and click edit signature. In there place this inside image tags.(substituting your own information):

Admittedly this was going to be my avatar one however the problem lies therein that the avatar system doesnt support it.
But my signature worked (obviously) and is below. These will change on page reload.
Anyhow, i hope this helps!
Sincerely,
Ember
==
Edit:
1) Olympe seems to be down
2) My Signature currently is not randomized either
So first thing first is to find your pictures, you can have any number but make sure they are all the same file type.(It wont work otherwise. you can always safely change the file extention of a static image such as jpg or png)
Afterwards write this code into notepad:
Code: Select all
<?php
header("Content-type: image/jpeg");
$display = rand(1, 8);
if ($display == 1) { readfile("1.jpeg"); }
if ($display == 2) { readfile("2.jpeg"); }
if ($display == 3) { readfile("3.jpeg"); }
if ($display == 4) { readfile("4.jpeg"); }
if ($display == 5) { readfile("5.jpeg"); }
if ($display == 6) { readfile("6.jpeg"); }
if ($display == 7) { readfile("7.jpeg"); }
if ($display == 8) { readfile("8.jpeg"); }
?>
Next get a FTP server running. It could be free, hosted, paid, or etc but make sure you have one. I used https://www.olympe.in since it was one of the first ones i found. (If you use the olympe.in site, it sends you a conformation email which you need to click before you register and actual name and password. Following make sure to create a Site in the Site tab. Remember the username and password that you use for the site, its important.)
After you get it running download a FTP client, i use Filezilla, but use whatever you prefer and login to the FTP server. (If you used olympe.in then use the following: Host: ftp.olympe.in User: 'your websites name' Password: 'Site password' Port: 21) After logging into the FTP server make a folder (you can name it anything) in the root of your FTP server. Then inside the folder place all of your images and the php file, then let them completely transfer(this could take some time depending on your network or FTP server)
Following this come onto the forums and go to your User Control Panel and click edit signature. In there place this inside image tags.(substituting your own information):
(this is case sensitive!!!!) and example might be:http://(server name).olympe.in/(folder created in root)/(Script name).php
If i place it in image brackets then:
Admittedly this was going to be my avatar one however the problem lies therein that the avatar system doesnt support it.
But my signature worked (obviously) and is below. These will change on page reload.
Anyhow, i hope this helps!
Sincerely,
Ember
==
Edit:
1) Olympe seems to be down
2) My Signature currently is not randomized either