[Frubar Paste] Hosted by SkyLime - Chat with us at XChannel IRC

Posted by show_rnd_pic on Tue 12th Jun 22:48
download

  1. <?php
  2.  
  3. ini_set('error_reporting', E_ALL);
  4. ini_set('display_errors', true);
  5.  
  6. $handle = @fopen("C:/httpd/htdocs/pictures.list", "r");
  7.  
  8. if ($handle)
  9. {
  10.     while (!feof($handle))
  11.     {
  12.         $PICS[] = rtrim(fgets($handle, 4096));
  13.     }
  14. }
  15.  
  16. fclose($handle);
  17.  
  18. $PICTURE_DIRECTORY = 'C:/httpd/htdocs/';
  19.  
  20.     echo '<html><head><link rel="stylesheet" type="text/css" href="pictures.css" /><title>rnd pictures</title><META HTTP-EQUIV=Refresh CONTENT="15; URL=http://127.0.0.1/show_rnd_pic.php"></head><body style="text-align: center;">'."\n";
  21.     echo '<div><p style="vertical-align: middle">'."\n";
  22.     echo '<ul class="gallery">'."\n";
  23.     echo '<li><a href="#" class="pic-'.rand(1,20).'"><img src="'.$PICS[rand(0,(count($PICS)-1))].'" alt="nothing" /></a></li>'."\n";
  24.     echo '<li><a href="#" class="pic-'.rand(1,20).'"><img src="'.$PICS[rand(0,(count($PICS)-1))].'" alt="nothing" /></a></li>'."\n";
  25.     echo '<li><a href="#" class="pic-'.rand(1,20).'"><img src="'.$PICS[rand(0,(count($PICS)-1))].'" alt="nothing" /></a></li>'."\n";
  26.     echo '</ul>'."\n";
  27.     echo '<ul class="gallery">'."\n";
  28.     echo '<li><a href="#" class="pic-'.rand(1,20).'"><img src="'.$PICS[rand(0,(count($PICS)-1))].'" alt="nothing" /></a></li>'."\n";
  29.     echo '<li><a href="#" class="pic-'.rand(1,20).'"><img src="'.$PICS[rand(0,(count($PICS)-1))].'" alt="nothing" /></a></li>'."\n";
  30.     echo '<li><a href="#" class="pic-'.rand(1,20).'"><img src="'.$PICS[rand(0,(count($PICS)-1))].'" alt="nothing" /></a></li>'."\n";
  31.     echo '</ul>'."\n";
  32.     echo '</p></div>'."\n";
  33.     echo '</body></html>'."\n";
  34. ?>


Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.



Remember my name in a cookie


Code: To highlight particular lines, prefix each line with @@.
Include comments to indicate what you need feedback on.