The version of vichan running on lainchan.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
529B

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