Jump to content

[SOLVED] Image Retreival


think-digitally

Recommended Posts

hmm, I still get it to work, it shows internal server error, and sometimes loads a page, but with random ?and blocks all over it. Any ideas?

 

Heres what I put in

 

<?php

$top=6; //How many images you have... or anything I guess.

$dir="2/";

$od=opendir($dir);

$rand=rand(1,$top);

$ndone=true;

 

while ($ndone) {

  while ($file=readdir($od)) {

    $nr=rand(1,$top);

    if ($nr==$rand) {

      readfile($dir."".$file);

      $ndone=false;

    }

  }

}

 

closedir($od);

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.