The version of vichan running on lainchan.org
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

21 lignes
544B

  1. <?php
  2. //renaming to bg.php
  3. $dir = "walls/";
  4. $files = scandir($dir);
  5. $images = array_diff($files, array('.', '..'));
  6. $name = $images[array_rand($images)];
  7. // open the file in a binary mode
  8. $fp = fopen($dir . $name, 'rb');
  9. // send the right headers
  10. header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1
  11. header('Pragma: no-cache'); // HTTP 1.0
  12. header('Expires: 0'); // Proxies
  13. header('Content-Type: ' . $fp['type']);
  14. header('Content-Length: ' . $fp['bytes']);
  15. // dump the picture and stop the script
  16. fpassthru($fp);
  17. exit;
  18. ?>