1
0

garbage.php 963 B

1234567891011121314151617181920212223242526272829
  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. header('Access-Control-Allow-Origin: *');
  9. header('Access-Control-Allow-Methods: GET, POST');
  10. // Download follows...
  11. header('Content-Description: File Transfer');
  12. header('Content-Type: application/octet-stream');
  13. header('Content-Disposition: attachment; filename=random.dat');
  14. header('Content-Transfer-Encoding: binary');
  15. // Never cache me
  16. header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
  17. header('Cache-Control: post-check=0, pre-check=0', false);
  18. header('Pragma: no-cache');
  19. // Generate data
  20. $data=openssl_random_pseudo_bytes(1048576);
  21. // Deliver chunks of 1048576 bytes
  22. $chunks=isset($_GET['ckSize']) ? intval($_GET['ckSize']) : 4;
  23. if(empty($chunks)){$chunks = 4;}
  24. if($chunks>100){$chunks = 100;}
  25. for($i=0;$i<$chunks;$i++){
  26. echo $data;
  27. flush();
  28. }
  29. ?>