<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Perplexed Labs &#187; ob_implicit_flush</title>
	<atom:link href="http://blog.perplexedlabs.com/tag/ob_implicit_flush/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.perplexedlabs.com</link>
	<description>web development war stories from the frontlines to the backend</description>
	<lastBuildDate>Sat, 24 Jul 2010 16:27:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PHP Realtime Output to Browser</title>
		<link>http://blog.perplexedlabs.com/2008/02/08/php-realtime-output-to-browser/</link>
		<comments>http://blog.perplexedlabs.com/2008/02/08/php-realtime-output-to-browser/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 15:52:59 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ob_flush]]></category>
		<category><![CDATA[ob_implicit_flush]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.perplexedlabs.com/2008/02/08/php-realtime-output-to-browser/</guid>
		<description><![CDATA[I write a lot of administrative scripts that have rather long execution times. Often it's desirable to be able to monitor the progress of the script in the browser, in realtime. By default I have my PHP installation setup with gzip output buffering enabled. This reduces the size of data transmitted to the client but [...]


Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/' rel='bookmark' title='Permanent Link: PHP jQuery AJAX Javascript Long Polling'>PHP jQuery AJAX Javascript Long Polling</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/04/09/php-daisy-chain-class-method-calls/' rel='bookmark' title='Permanent Link: PHP Daisy Chain Class Method Calls'>PHP Daisy Chain Class Method Calls</a></li>
<li><a href='http://blog.perplexedlabs.com/2009/04/22/php-named-parameters/' rel='bookmark' title='Permanent Link: PHP Named Parameters'>PHP Named Parameters</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I write a lot of administrative scripts that have rather long execution times.  Often it's desirable to be able to monitor the progress of the script in the browser, in realtime.  By default I have my PHP installation setup with gzip output buffering enabled.  This reduces the size of data transmitted to the client but also (obviously) buffers the output.</p>
<p>The PHP manual states that calling <strong><a href="http://us3.php.net/manual/en/function.ob-implicit-flush.php">ob_implicit_flush();</a></strong> <em>"...will turn implicit flushing on or off. Implicit flushing will result in a flush operation after every output call, so that explicit calls to flush() will no longer be needed."</em>.  In my experience this doesn't actually happen.</p>
<p>The answer is simple.  After every portion of output (whether it be nested html, echo, print - whatever) simply call <strong><a href="http://us3.php.net/manual/en/function.ob-flush.php">ob_flush();</a></strong>.</p>


<p>Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/' rel='bookmark' title='Permanent Link: PHP jQuery AJAX Javascript Long Polling'>PHP jQuery AJAX Javascript Long Polling</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/04/09/php-daisy-chain-class-method-calls/' rel='bookmark' title='Permanent Link: PHP Daisy Chain Class Method Calls'>PHP Daisy Chain Class Method Calls</a></li>
<li><a href='http://blog.perplexedlabs.com/2009/04/22/php-named-parameters/' rel='bookmark' title='Permanent Link: PHP Named Parameters'>PHP Named Parameters</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.perplexedlabs.com/2008/02/08/php-realtime-output-to-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
