Welcome to Gaia! ::

Ooh!! Thank you!!
R A M Z A I ******** Love you! You helped me get a random Sig!!
This Thread helped me understand everything better! heart
ek..as you can see in my sig...the pics arent working...could you help me with that..i did everythingi was supposed to...i made sure the url was right...and its still not workin...-_-
C00D109B

will give you a hug
thanks it worked ^_^
<?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])
?>

Something to add:
Make sure your images are named ".jpg", ".gif", or ".png" - the code provided here does NOT understand that they're the same thing if it's capitalized! It won't understand it if you have them named (example) "example.PNG"; but it will if it's "example.png".

Also, MAKE SURE YOU NAME THE .PHP FILE "rand.php", otherwise it will try to load the random-image generator as an image, making a broken image pop up in your sig!
Thank you very much I am most apreciative
yay! i now have a pretty new siggy! thanks alot for posting this info^^
i used this site the other day to get a random siggy and it helped alot!.
<3
but now, im trying to add a new image at bfn, and its not letting me.
sweatdrop
can someone help me?
nevermind.
i figured it out.
sweatdrop
Thank you!! It helped me. ^_^
swedishsk8ter
heart
::hugs::
Thank you sooo much!!

Quick Reply

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