<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Monitor progress of long running Php scripts with Html5 server sent events	</title>
	<atom:link href="https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Mon, 01 May 2023 14:19:39 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Bruce Thompson		</title>
		<link>https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-277136</link>

		<dc:creator><![CDATA[Bruce Thompson]]></dc:creator>
		<pubDate>Tue, 01 Sep 2020 13:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.codekites.com/?p=3783#comment-277136</guid>

					<description><![CDATA[I had the same problem as Qasim Zubair and solved it the same way. You should add:
header(‘X-Accel-Buffering: no’);
to send_message() after the echo statements.

The correct send_message() function is:
function send_message($id, $message, $progress) 
{
	$d = array(&#039;message&#039; =&#062; $message , &#039;progress&#039; =&#062; $progress);
	
	echo &quot;id: $id&quot; . PHP_EOL;
	echo &quot;data: &quot; . json_encode($d) . PHP_EOL;
	echo PHP_EOL;
    //PUSH THE data out by all FORCE POSSIBLE
    header(&quot;X-Accel-Buffering: no&quot;);
    ob_end_flush();
	flush();
}


In addition, you have a bug in the php code. The line:
send_message($serverTime, &#039;TERMINATE&#039;);
should be changed to:
send_message($serverTime, &#039;TERMINATE&#039;, 100);]]></description>
			<content:encoded><![CDATA[<p>I had the same problem as Qasim Zubair and solved it the same way. You should add:<br />
header(‘X-Accel-Buffering: no’);<br />
to send_message() after the echo statements.</p>
<p>The correct send_message() function is:<br />
function send_message($id, $message, $progress)<br />
{<br />
	$d = array(&#8216;message&#8217; =&gt; $message , &#8216;progress&#8217; =&gt; $progress);</p>
<p>	echo &#8220;id: $id&#8221; . PHP_EOL;<br />
	echo &#8220;data: &#8221; . json_encode($d) . PHP_EOL;<br />
	echo PHP_EOL;<br />
    //PUSH THE data out by all FORCE POSSIBLE<br />
    header(&#8220;X-Accel-Buffering: no&#8221;);<br />
    ob_end_flush();<br />
	flush();<br />
}</p>
<p>In addition, you have a bug in the php code. The line:<br />
send_message($serverTime, &#8216;TERMINATE&#8217;);<br />
should be changed to:<br />
send_message($serverTime, &#8216;TERMINATE&#8217;, 100);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ian		</title>
		<link>https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-248735</link>

		<dc:creator><![CDATA[Ian]]></dc:creator>
		<pubDate>Mon, 04 May 2020 09:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.codekites.com/?p=3783#comment-248735</guid>

					<description><![CDATA[Not sure I understand ithis...  when running the client side code... how does the server side code (task.php) get started?

I get the Error message as its triggering the add_log(&#039;Error occured&#039;); function.]]></description>
			<content:encoded><![CDATA[<p>Not sure I understand ithis&#8230;  when running the client side code&#8230; how does the server side code (task.php) get started?</p>
<p>I get the Error message as its triggering the add_log(&#8216;Error occured&#8217;); function.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike		</title>
		<link>https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-115821</link>

		<dc:creator><![CDATA[Mike]]></dc:creator>
		<pubDate>Mon, 24 Apr 2017 15:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.codekites.com/?p=3783#comment-115821</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-71430&quot;&gt;noup&lt;/a&gt;.

Useless reply from noup... why even reply if you have no idea or cannot provide any useful information???

 eli, or others, if this problem occurs try turning off virus protection or the firewall to see if it corrects.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-71430">noup</a>.</p>
<p>Useless reply from noup&#8230; why even reply if you have no idea or cannot provide any useful information???</p>
<p> eli, or others, if this problem occurs try turning off virus protection or the firewall to see if it corrects.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: SADi		</title>
		<link>https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-98646</link>

		<dc:creator><![CDATA[SADi]]></dc:creator>
		<pubDate>Fri, 18 Nov 2016 15:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.codekites.com/?p=3783#comment-98646</guid>

					<description><![CDATA[for me it&#039;s working on localhost but on server doesn&#039;t work, any idea?]]></description>
			<content:encoded><![CDATA[<p>for me it&#8217;s working on localhost but on server doesn&#8217;t work, any idea?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Qasim Zubair		</title>
		<link>https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-97071</link>

		<dc:creator><![CDATA[Qasim Zubair]]></dc:creator>
		<pubDate>Wed, 26 Oct 2016 20:23:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.codekites.com/?p=3783#comment-97071</guid>

					<description><![CDATA[I am using nginx. I had to add header(&#039;X-Accel-Buffering: no&#039;); 
and in send_message() function I had to add ob_flush();
    flush(); to make it work]]></description>
			<content:encoded><![CDATA[<p>I am using nginx. I had to add header(&#8216;X-Accel-Buffering: no&#8217;);<br />
and in send_message() function I had to add ob_flush();<br />
    flush(); to make it work</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: noup		</title>
		<link>https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-71430</link>

		<dc:creator><![CDATA[noup]]></dc:creator>
		<pubDate>Wed, 23 Mar 2016 19:56:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.codekites.com/?p=3783#comment-71430</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-65624&quot;&gt;eli&lt;/a&gt;.

its not so easy as copy and paste. You should understand how it works a little bit as well.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-65624">eli</a>.</p>
<p>its not so easy as copy and paste. You should understand how it works a little bit as well.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: eli		</title>
		<link>https://www.binarytides.com/monitor-progress-long-running-php-scripts-html5-server-sent-events/comment-page-1/#comment-65624</link>

		<dc:creator><![CDATA[eli]]></dc:creator>
		<pubDate>Tue, 30 Jul 2013 07:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.codekites.com/?p=3783#comment-65624</guid>

					<description><![CDATA[Works fine in your example, but ..
I uploaded the files to powweb. Messages now only appear (all together) after the php has completed.


help !]]></description>
			<content:encoded><![CDATA[<p>Works fine in your example, but ..<br />
I uploaded the files to powweb. Messages now only appear (all together) after the php has completed.</p>
<p>help !</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
