Guest User

Untitled

a guest
Jul 14th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2. $random = md5 ( rand () . microtime () );
  3. header( 'Content-type: multipart/x-mixed-replace;boundary=' . $random );
  4.  
  5. echo "\n--$random\n";
  6.  
  7. $i = 1;
  8.  
  9. while ( $i < 5 ){
  10. echo "Content-type: text/html\n\n";
  11. echo "<b>$i</b>\n";
  12. echo "--$random\n";
  13. $t = do_output ();
  14. $i++;
  15. }
  16.  
  17. echo "Content-type: text/html\n\n";
  18. echo "<h1> http headers are fun</h1>\n";
  19. echo "--$random--\n";
  20.  
  21. function do_output ()
  22. {
  23. $t = flush();
  24. $t = ob_flush();
  25. usleep(3000000);
  26. return 0;
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment