• 0

New Signature


Question

9 answers to this question

Recommended Posts

  • 0
thats tight:woot:

but what script are you using to switch img's every time you refresh?

It's a very simple PHP script:

<?php
$dh = opendir(".");
while (false !== ($file = readdir($dh)))
{
  if (preg_match('/\.jpg$/i', $file) and $file != "avatar.jpg") // sanning for .jpg files only and stopping signature.jpg being loaded (you will run into errors if this isnt here)
  {
     $filelist[] = $file;
  }
}

srand((double)microtime()*1000000);
$picnum = rand(0, sizeof($filelist) - 1);

header("Location: " . $filelist[$picnum]);

closedir($dh);
?>

Then all the other images are labeled signature1.jpg, signature 2.jpg, etc.

Link to comment
Share on other sites

  • 0
Wow, that is pretty sweet, good job!

eh, thanks! but can you give me an example of where the location of the files should be

like where to i post link to locate the img files in php code?

im testing this since i dont know php much... i learn quicktly tho :)

Link to comment
Share on other sites

  • 0
eh, thanks! but can you give me an example of where the location of the files should be

like where to i post link to locate the img files in php code?

im testing this since i dont know php much... i learn quicktly tho :)

See this page for more information :)

Link to comment
Share on other sites

  • 0
Is the "did you see where my top went" Jennifer Love Hewitt? It kinda looks like her...but I'd say that's my favorite out of the bunch....just because I like JLH. :)

That'd be her ;)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.