Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ignore_user_abort(true); // Ignore user abort
- set_time_limit(0); // Allow script to run forever
- while(1)
- {
- echo chr(0);
- ob_flush();
- flush();
- /* connection_status would always return 0 without the 3 instructions above */
- if ( connection_status() != CONNECTION_NORMAL )
- {
- // Create this file when the connection's aborted
- file_put_contents('connection_aborted', '');
- break;
- }
- sleep(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement