Skip to content

Instantly share code, notes, and snippets.

Created March 31, 2014 08:42
Show Gist options
  • Select an option

  • Save anonymous/9888034 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/9888034 to your computer and use it in GitHub Desktop.
<?php
set_time_limit(0);
ignore_user_abort(true);
header("Connection: close\r\n");
header("Content-Encoding: none\r\n");
ob_start();
echo "client output";
$size = ob_get_length();
header("Content-Length: $size",true);
ob_end_flush();
ob_flush();
flush();
sleep(15);
//do something
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment