Welcome to Gaia! ::

8th page bump

people need to see this...
Kao-chan's avatar
  • 200
  • 50
  • 100
thx a lot biggrin (I'm glad to know why my sig didn't work anymore stare )
Sorry I'm too lazy to do it right know so I'm just bookmarking this thread xp but I didn't know any other sites so YES this thread is helpful ! biggrin
Thank Gaia! whee

It IS helping sweatdrop
Oh yes, thanks very much for this. :3

I'll point people to this thread when they ask about Randosigs. whee
Ramza, for anyone curious, Jakobo also made "the world's smallest Randosig generator".
Taken straight from the Daily Post. Which died a while back.
And, yes, I'm actually still using it in my sig.
Want me to post it?
Yes, please. surprised
Jakobo
The SMALLEST Random Image Generator
The 26 Line Randosig

Supported Web Host(s):
Any Web Host that supports PHP 4.3 or better (most do).
If you need a free host, we recommend http://www.hostinganime.com

We've talked about a spell checker for IE, and we've shown you some great tools for FireFox including a right-click bbcode context menu. Probably one of the biggest questions asked in Questions & Feedback is about random sig generators. A different image every time you refresh the page. Undoubtedly, one of the most popular is Rome, but the Toolbox is all about self-empowerment. And so, this time, we are going to show you a 26 line file that will let you host your own random sig generator!

Mandatory Background Information
We're going to be working with PHP, a web based scripting language. If your host supports PHP, they will say so, and they will advertise it. Sites such as geocities and angelfire do not have php based hosting. Freewebs does not have PHP hosting. The only currently known free provider that has php based hosting is hostinganime.com (see link at top). We are not going to make you code anything in this thing either, but we are going to have you make a file and upload it. Here are some very basic rules:
- You need a text editor (Notepad, Textpad, Simpletext, KWrite, etc)
- You need a way to put the file we make on your host (FTP)

If you have both of these things, we are ready to begin. You will also want some images. (gif, jpg. or png)


Step 1: rand.php and uploading
No joke, this will be the hardest step. Open a text editor from the above list, and paste the following code, from <?PHP to the final ?>
<?PHP
//////////////////////////////////////////////////////////////////
// Your Own Personal "RandoSig"
// Done for the Daily Post: Your authoritative QnF paper!
// Code by Jakob (Jakobo). Public Domain.
//////////////////////////////////////////////////////////////////
$files = Array()
if (is_dir("./")) {
if ($dh = opendir("./")) {
while (($file = readdir($dh)) !== false) {
if($file != "." &&
$file != ".." &&
$file != "" &&
$file != "rand.php") { $files[] = $file; }
}
closedir($dh)
}
}
$random_file = (rand()&#xsi;zeof($files))
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT")
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT")
header("Cache-Control: no-store, no-cache, must-revalidate")
header("Cache-Control: post-check=0, pre-check=0", false)
header("Pragma: no-cache")
if(substr($files[$random_file], -3) == "jpg") {
header("Content-type: image/jpeg")
} elseif(substr($files[$random_file], -3) == "gif") {
header("Content-type: image/gif")
} elseif(substr($files[$random_file], -3) == "png") {
header("Content-type: image/png")
} else { header("Content-type: text/plain")
echo "Image Error, could not load (".$random_file.")".
$files[$random_file] print_r($files) }
@readfile($files[$random_file])
?>


Before you say it, yes, it is 35 lines, not 26. The longer lines were broken up for readability (and so they would copy correctly). Now that you have this all pasted in, save the file as rand.php somewhere you can find it (I recommend the desktop). Then, upload it into a directory on your web server.

While you are uploading, upload the images you would like to have randomized as well. Here's a picture of my directory:

Your Sig's Directory

<center>

EDIT BY KENJOKI
Broken image. sad
EDIT BY KENJOKI

5 image files and the "rand.php" file.
For this to work right, remember not to put anything other than images and rand.php into this directory!</center>


Step 2: Using
See, I told you that would be the hard part. If you uploaded your rand.php and your images, you are done. Yes, done. To call the random sig, simply create an img tag pointing to rand.php. For example:
[img]http://gaia.felocity.org/gavsim/rand.php[/img]


Drop that image tag into your sig, and you're done! And you didn't really have to lift a finger.

You know it was good for you too... discuss it!


Note: This is pretty old ((July 7th-ish)), BUT it still works! Need proof? Refresh the page a few times, and keep an eye on my siggy. There's your proof of it working just fine. wink
And yes! Hostinganime.com STILL has FREE webspace!
Hosting Anime.com
20 MB Disk space
Unlimited Transfer
A http://hostinganime.com/YOURSITE URL
PHP, SSI, HTML Support
Fast Servers
Instant Activation
Support Forums
Form Mail
wwwboard

There's two plans - Banners or Popup/under ad-plans.
That's how this stays free, and I believe that all ads are for anime-related stuff.
3nodding
Dang! That's huge! xd

*runs off to edit the front page*
Glad to be of service.
::pets bookmarks::
I'm glad I kept you, Daily Post bookmark.
smile
OK.. front page fixed.. for now... I'm sure there's typos.. but I'll get those later....

now all we have to do is make sure everyone sees this... I say we make brain implants...
>.>
Back page bump...
*I just got a trunk on this page xd *

I'm going to use this tutorial. Thank you for posting it for us more computarded users 3nodding heart
back page bump...
back page bump...

Quick Reply

Submit
Manage Your Items
Other Stuff
Get Items
Get Gaia Cash
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff