garbage.php 1013 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. // Disable Compression
  3. @ini_set('zlib.output_compression', 'Off');
  4. @ini_set('output_buffering', 'Off');
  5. @ini_set('output_handler', '');
  6. // Headers
  7. header('HTTP/1.1 200 OK');
  8. if(isset($_GET["cors"])){
  9. header('Access-Control-Allow-Origin: *');
  10. header('Access-Control-Allow-Methods: GET, POST');
  11. }
  12. // Download follows...
  13. header('Content-Description: File Transfer');
  14. header('Content-Type: application/octet-stream');
  15. header('Content-Disposition: attachment; filename=random.dat');
  16. header('Content-Transfer-Encoding: binary');
  17. // Never cache me
  18. header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0, s-maxage=0');
  19. header('Cache-Control: post-check=0, pre-check=0', false);
  20. header('Pragma: no-cache');
  21. // Generate data
  22. $data=openssl_random_pseudo_bytes(1048576);
  23. // Deliver chunks of 1048576 bytes
  24. $chunks=isset($_GET['ckSize']) ? intval($_GET['ckSize']) : 4;
  25. if(empty($chunks)){$chunks = 4;}
  26. if($chunks>1024){$chunks = 1024;}
  27. for($i=0;$i<$chunks;$i++){
  28. echo $data;
  29. flush();
  30. }
  31. ?>