<?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: PHP jQuery AJAX Javascript Long Polling</title>
	<atom:link href="http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/</link>
	<description>web development war stories from the frontlines to the backend</description>
	<lastBuildDate>Thu, 11 Mar 2010 23:47:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: TJ Mapes</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2732</link>
		<dc:creator>TJ Mapes</dc:creator>
		<pubDate>Wed, 02 Dec 2009 02:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2732</guid>
		<description>Wow great post, does this FB Work?</description>
		<content:encoded><![CDATA[<p>Wow great post, does this FB Work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TJ Mapes</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2719</link>
		<dc:creator>TJ Mapes</dc:creator>
		<pubDate>Tue, 01 Dec 2009 21:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2719</guid>
		<description>Wow great post, does this FB Work?</description>
		<content:encoded><![CDATA[<p>Wow great post, does this FB Work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Resources for PHP Webmail &#171; David Woodfield</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2713</link>
		<dc:creator>Resources for PHP Webmail &#171; David Woodfield</dc:creator>
		<pubDate>Tue, 24 Nov 2009 16:55:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2713</guid>
		<description>[...] http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/" rel="nofollow">http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko Jovanovic</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2695</link>
		<dc:creator>Marko Jovanovic</dc:creator>
		<pubDate>Tue, 15 Sep 2009 20:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2695</guid>
		<description>Thank you... Thank you...Hey did i say THANK YOU!&lt;br&gt;You probably saved 2 weeks of my life :)</description>
		<content:encoded><![CDATA[<p>Thank you&#8230; Thank you&#8230;Hey did i say THANK YOU!<br />You probably saved 2 weeks of my life :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: imwoodie</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2694</link>
		<dc:creator>imwoodie</dc:creator>
		<pubDate>Sun, 13 Sep 2009 02:23:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2694</guid>
		<description>thanks for correction in memcache matt..&lt;br&gt;&lt;br&gt;sorry, the code above was alert(bidid) not alert(&#039;bidid&#039;);&lt;br&gt;the alert box is displayed well with returned data from xml&lt;br&gt;it works in all browser except in I.E all version&lt;br&gt;in I.E the alert box is not displayed.. that&#039;s the problem&lt;br&gt;&lt;br&gt;is there any special code for I.E?&lt;br&gt;how to make it works in all brower matt with no exceptiom, &lt;br&gt;I&#039;m getting stuck with it.&lt;br&gt;&lt;br&gt;Thanks</description>
		<content:encoded><![CDATA[<p>thanks for correction in memcache matt..</p>
<p>sorry, the code above was alert(bidid) not alert(&#39;bidid&#39;);<br />the alert box is displayed well with returned data from xml<br />it works in all browser except in I.E all version<br />in I.E the alert box is not displayed.. that&#39;s the problem</p>
<p>is there any special code for I.E?<br />how to make it works in all brower matt with no exceptiom, <br />I&#39;m getting stuck with it.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matticakes</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2693</link>
		<dc:creator>matticakes</dc:creator>
		<pubDate>Sat, 12 Sep 2009 19:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2693</guid>
		<description>A couple things.&lt;br&gt;&lt;br&gt;You should move your memcache connection line outside the while loop - you don&#039;t want to reconnect every iteration.&lt;br&gt;&lt;br&gt;$data, the way you have it written, can never be empty so the loop will always only run one iteration.&lt;br&gt;&lt;br&gt;If there are no script errors being reported, is an empty alert box being displayed?</description>
		<content:encoded><![CDATA[<p>A couple things.</p>
<p>You should move your memcache connection line outside the while loop &#8211; you don&#39;t want to reconnect every iteration.</p>
<p>$data, the way you have it written, can never be empty so the loop will always only run one iteration.</p>
<p>If there are no script errors being reported, is an empty alert box being displayed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: imwoodie</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2692</link>
		<dc:creator>imwoodie</dc:creator>
		<pubDate>Sat, 12 Sep 2009 18:02:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2692</guid>
		<description>thanks for reply matt.. appreciate.&lt;br&gt;&lt;br&gt;well there&#039;s no error code in I.E, I&#039;m not using jason but xml as a data..&lt;br&gt;here are code that I try to implement :&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;	var lpOnComplete = function(response) {&lt;br&gt;		$(response).find(&#039;id&#039;).each(function(){&lt;br&gt;			var id = $(this); &lt;br&gt;			bidid = id.attr(&quot;id&quot;);&lt;br&gt;			alert(&#039;bidid&#039;);&lt;br&gt;		// do more processing&lt;br&gt;		});&lt;br&gt;		&lt;br&gt;		lpStart();&lt;br&gt;	};&lt;br&gt;	&lt;br&gt;	var lpStart = function() {&lt;br&gt;		//$.ajaxSetup({ cache: false });&lt;br&gt;		$.get(&#039;proc.php&#039;,  { }, lpOnComplete, &#039;XML&#039;);&lt;br&gt;	};&lt;br&gt;	&lt;br&gt;	$(document).ready(lpStart);&lt;br&gt;&lt;code&gt;&lt;br&gt;&lt;br&gt;This is &lt;em&gt;proc.php&lt;/em&gt;, I&#039;m using memcache&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;&lt;?php&lt;br&gt;$time = time();&lt;br&gt;while((time() - $time) &lt; 30) {&lt;br&gt;&lt;br&gt;	// query memcache, database, etc. for new data&lt;br&gt;	$memcache_obj = memcache_connect(&#039;127.0.0.1&#039;, 11211);&lt;br&gt;	$data = &quot;&lt;?xml version=&#039;1.0&#039; encoding=&#039;iso-8859-1&#039;?&gt;&lt;br&gt;		  &lt;data&gt;&quot; . memcache_get($memcache_obj, &#039;bid&#039;) . &quot;&lt;/data&gt;&quot;; &lt;br&gt;&lt;br&gt;	// data is always new&lt;br&gt;	if(!empty($data)) {&lt;br&gt;		Header(&quot;Content-Type: text/xml&quot;);&lt;br&gt;		echo $data;&lt;br&gt;		break;&lt;br&gt;	}&lt;br&gt;	usleep(2500);&lt;br&gt;	flush();&lt;br&gt;}&lt;br&gt;?&gt;&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;It doesn&#039;t work in I.E&lt;br&gt;&lt;br&gt;Thanks again matt&lt;/code&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>thanks for reply matt.. appreciate.</p>
<p>well there&#39;s no error code in I.E, I&#39;m not using jason but xml as a data..<br />here are code that I try to implement :</p>
<p><code><br />	var lpOnComplete = function(response) {<br />		$(response).find(&#39;id&#39;).each(function(){<br />			var id = $(this); <br />			bidid = id.attr("id");<br />			alert(&#39;bidid&#39;);<br />		// do more processing<br />		});</p>
<p>		lpStart();<br />	};</p>
<p>	var lpStart = function() {<br />		//$.ajaxSetup({ cache: false });<br />		$.get(&#39;proc.php&#39;,  { }, lpOnComplete, &#39;XML&#39;);<br />	};</p>
<p>	$(document).ready(lpStart);<br /></code><code></p>
<p>This is <em>proc.php</em>, I&#39;m using memcache</p>
<p></code><code><br />&lt;?php<br />$time = time();<br />while((time() - $time) &lt; 30) {</p>
<p>	// query memcache, database, etc. for new data<br />	$memcache_obj = memcache_connect(&#39;127.0.0.1&#39;, 11211);<br />	$data = "&lt;?xml version=&#39;1.0&#39; encoding=&#39;iso-8859-1&#39;?&gt;<br />		  &lt;data&gt;" . memcache_get($memcache_obj, &#39;bid&#39;) . "&lt;/data&gt;"; </p>
<p>	// data is always new<br />	if(!empty($data)) {<br />		Header("Content-Type: text/xml");<br />		echo $data;<br />		break;<br />	}<br />	usleep(2500);<br />	flush();<br />}<br />?&gt;<br /></code></p>
<p>It doesn&#39;t work in I.E</p>
<p>Thanks again matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matticakes</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2691</link>
		<dc:creator>matticakes</dc:creator>
		<pubDate>Fri, 11 Sep 2009 18:11:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2691</guid>
		<description>have you tried enabling script debugging to see what line of code is causing the problem?</description>
		<content:encoded><![CDATA[<p>have you tried enabling script debugging to see what line of code is causing the problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: imwoodie</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2690</link>
		<dc:creator>imwoodie</dc:creator>
		<pubDate>Thu, 10 Sep 2009 08:37:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2690</guid>
		<description>Hi, I&#039;m using jquery-1.3.2.. I try to implement your code and is running well in FF, safari, and opera. but it doesn&#039;t work in IE.. would you like to give me a clue.. thank you</description>
		<content:encoded><![CDATA[<p>Hi, I&#39;m using jquery-1.3.2.. I try to implement your code and is running well in FF, safari, and opera. but it doesn&#39;t work in IE.. would you like to give me a clue.. thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: d1Mm</title>
		<link>http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/comment-page-1/#comment-2687</link>
		<dc:creator>d1Mm</dc:creator>
		<pubDate>Thu, 03 Sep 2009 15:39:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=217#comment-2687</guid>
		<description>&gt; sleep(25000);&lt;br&gt;it&#039;s about 7 hours ;)&lt;br&gt;may be usleep(25000) ?</description>
		<content:encoded><![CDATA[<p>&gt; sleep(25000);<br />it&#39;s about 7 hours ;)<br />may be usleep(25000) ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
