<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to create a Digg-like spy with no work at all</title>
	<link>http://leftlogic.com/lounge/articles/jquery_spy/</link>
	<description>Left Logic articles and news / Left Logic is a Brighton based web development and design consultancy</description>
	<pubDate>Sat, 11 Oct 2008 19:20:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>

	<item>
		<title>By: Chris</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-163</link>
		<author>Chris</author>
		<pubDate>Mon, 14 Aug 2006 14:03:45 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-163</guid>
					<description>&lt;p&gt;Dude I was looking at your Jquery thing - is this the file that gets your content?&lt;br /&gt;&lt;br /&gt;/jquery_spy/out.php&lt;br /&gt;&lt;br /&gt;The thing I don't get about AJAX is how it queries the databse on the fly.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dude I was looking at your Jquery thing - is this the file that gets your content?</p>
<p>/jquery_spy/out.php</p>
<p>The thing I don't get about AJAX is how it queries the databse on the fly.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy Sharp</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-164</link>
		<author>Remy Sharp</author>
		<pubDate>Mon, 14 Aug 2006 14:13:39 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-164</guid>
					<description>&lt;p&gt;Chris - The 'AJAX' response doesn't have to be intimidating, think of the page (in my example out.php) as a very mini HTML page.&lt;br /&gt;&lt;br /&gt;The requested script my be something:&lt;br /&gt;&lt;br /&gt;[psudocode]&lt;br /&gt;$row = query(&#34;select * from articles where timestamp &#62; $&lt;em&gt;POST['timestamp'] order by timestamp desc limit1&#34;);&lt;br /&gt;print&lt;/em&gt;html($row);&lt;br /&gt;[/psduocode]&lt;br /&gt;&lt;br /&gt;The AJAX part is done in the browser, just calling your script and processing the output - and in the simplest case, adding the HTML to the page.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Chris - The 'AJAX' response doesn't have to be intimidating, think of the page (in my example out.php) as a very mini HTML page.</p>
<p>The requested script my be something:</p>
<p>[psudocode]<br />$row = query(&quot;select * from articles where timestamp &gt; $<em>POST['timestamp'] order by timestamp desc limit1&quot;);<br />print</em>html($row);<br />[/psduocode]</p>
<p>The AJAX part is done in the browser, just calling your script and processing the output - and in the simplest case, adding the HTML to the page.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Ben Borges</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-165</link>
		<author>Ben Borges</author>
		<pubDate>Mon, 14 Aug 2006 20:57:10 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-165</guid>
					<description>&lt;p&gt;This look great ! i wonder how i could apply this for my Joomla! website..is it possible to pull out data from an rss/xml feed ?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This look great ! i wonder how i could apply this for my Joomla! website..is it possible to pull out data from an rss/xml feed ?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Cameron Kollwitz</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-166</link>
		<author>Cameron Kollwitz</author>
		<pubDate>Mon, 14 Aug 2006 21:19:37 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-166</guid>
					<description>&lt;p&gt;Looks awesome!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Looks awesome!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Zac McCormick</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-167</link>
		<author>Zac McCormick</author>
		<pubDate>Mon, 14 Aug 2006 21:31:48 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-167</guid>
					<description>&lt;p&gt;Awesome script! Very cool effect. Though it is worth mentioning (and I'm sure the author knows this but left it out for the sake of simplicity) that pinging the server every single time a new item scans down isn't a good idea. Every iteration of the animation a POST is done to the server to get the new item. Digg's spy uses a slightly more complicated batch retrieval of items, so there isn't a 1:1 ratio of postbacks to items. I also don't think digg actually displays every single item, it shows enough items to give the perception of a real-time display. If the &#34;digg throughput&#34; exceeds the animation speed, there's no way for it show them all :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Awesome script! Very cool effect. Though it is worth mentioning (and I'm sure the author knows this but left it out for the sake of simplicity) that pinging the server every single time a new item scans down isn't a good idea. Every iteration of the animation a POST is done to the server to get the new item. Digg's spy uses a slightly more complicated batch retrieval of items, so there isn't a 1:1 ratio of postbacks to items. I also don't think digg actually displays every single item, it shows enough items to give the perception of a real-time display. If the &quot;digg throughput&quot; exceeds the animation speed, there's no way for it show them all :)</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy Sharp</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-168</link>
		<author>Remy Sharp</author>
		<pubDate>Mon, 14 Aug 2006 21:38:38 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-168</guid>
					<description>&lt;p&gt;Ben - yes, absolutely, you can write a short push function and parse the RSS to grab the latest news.&lt;br /&gt;&lt;br /&gt;Zac - yep - I certainly don't expect Digg to switch to this any time quickly ;-) but it would be interesting to look in to throttling the processing.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ben - yes, absolutely, you can write a short push function and parse the RSS to grab the latest news.</p>
<p>Zac - yep - I certainly don't expect Digg to switch to this any time quickly ;-) but it would be interesting to look in to throttling the processing.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Henry</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-169</link>
		<author>Henry</author>
		<pubDate>Mon, 14 Aug 2006 21:46:08 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-169</guid>
					<description>&lt;p&gt;Could you perhaps show us the actual PHP code for this example/how to write a push function to parse the RSS?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Could you perhaps show us the actual PHP code for this example/how to write a push function to parse the RSS?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy Sharp</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-170</link>
		<author>Remy Sharp</author>
		<pubDate>Mon, 14 Aug 2006 22:11:15 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-170</guid>
					<description>&lt;p&gt;Here's the PHP used for the example:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://leftlogic.com/jquery_spy/out.php.txt"&gt;http://leftlogic.com/jquery_spy/out.php.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As for a push function for the RSS, I'll post a follow up soon (I'm on hols soon - so next week).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Here's the PHP used for the example:</p>
<p><a href="http://leftlogic.com/jquery_spy/out.php.txt">http://leftlogic.com/jquery_spy/out.php.txt</a></p>
<p>As for a push function for the RSS, I'll post a follow up soon (I'm on hols soon - so next week).</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: danny43</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-171</link>
		<author>danny43</author>
		<pubDate>Tue, 15 Aug 2006 04:22:11 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-171</guid>
					<description>&lt;p&gt;i was also wondering how to get this to display a rss feed, if you could help me out i would be for ever greatfull. thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>i was also wondering how to get this to display a rss feed, if you could help me out i would be for ever greatfull. thanks</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Anand</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-172</link>
		<author>Anand</author>
		<pubDate>Tue, 15 Aug 2006 07:39:02 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-172</guid>
					<description>&lt;p&gt;Javascript!? Heard it doesn't add search engine value to the site..&lt;/p&gt;

&lt;p&gt;Is this available in PHP or so?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Javascript!? Heard it doesn't add search engine value to the site..</p>
<p>Is this available in PHP or so?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: jubei</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-173</link>
		<author>jubei</author>
		<pubDate>Tue, 15 Aug 2006 11:03:52 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-173</guid>
					<description>&lt;p&gt;Would be nice if it it was possible to show what page people are currently viewing instead of the whole content /rss. I mean showing an RSS feed is kind of pointless because the RSS feed, for the most part, is stable. It generally only gets updated hourly (if not longer) - so it would show like 8 items and then fade away or loop again showing them, just use a marquee with some javascript fading to show the rss feed - very simple to create.&lt;/p&gt;

&lt;p&gt;What I'd like to do with this, is show what page of a blog people are viewing - so as ppl click you can view what pages are being viewed. Problem is that my blog is flatfile with server side.. so i don't use a database which makes it more difficult.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Would be nice if it it was possible to show what page people are currently viewing instead of the whole content /rss. I mean showing an RSS feed is kind of pointless because the RSS feed, for the most part, is stable. It generally only gets updated hourly (if not longer) - so it would show like 8 items and then fade away or loop again showing them, just use a marquee with some javascript fading to show the rss feed - very simple to create.</p>
<p>What I'd like to do with this, is show what page of a blog people are viewing - so as ppl click you can view what pages are being viewed. Problem is that my blog is flatfile with server side.. so i don't use a database which makes it more difficult.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Sam</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-174</link>
		<author>Sam</author>
		<pubDate>Tue, 15 Aug 2006 12:37:02 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-174</guid>
					<description>&lt;p&gt;I'm trying to get my head around how one would pull rows from a database based on a timestamp. I know the implications of such a method, but being able to display the latest updated rows would be very neat indeed.&lt;/p&gt;

&lt;p&gt;Any ideas?&lt;/p&gt;

&lt;p&gt;Great tutorial regardless! Thanks a lot.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I'm trying to get my head around how one would pull rows from a database based on a timestamp. I know the implications of such a method, but being able to display the latest updated rows would be very neat indeed.</p>
<p>Any ideas?</p>
<p>Great tutorial regardless! Thanks a lot.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Fotis Evangelou</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-175</link>
		<author>Fotis Evangelou</author>
		<pubDate>Tue, 15 Aug 2006 12:55:02 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-175</guid>
					<description>&lt;p&gt;@Ben Borges&lt;/p&gt;

&lt;p&gt;Wait for a new joomla module for this! Perhaps next week. Check out www.webpr.gr/joomla for updates.&lt;/p&gt;

&lt;p&gt;@Remy Sharp&lt;/p&gt;

&lt;p&gt;Excellent work. When our Joomla implementation is finished, I will send you a link, if it's OK with you.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Ben Borges</p>
<p>Wait for a new joomla module for this! Perhaps next week. Check out www.webpr.gr/joomla for updates.</p>
<p>@Remy Sharp</p>
<p>Excellent work. When our Joomla implementation is finished, I will send you a link, if it's OK with you.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: jimy</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-176</link>
		<author>jimy</author>
		<pubDate>Tue, 15 Aug 2006 16:12:27 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-176</guid>
					<description>&lt;p&gt;Looks great, tnx u so much. I m going to try it for my blog (:&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Looks great, tnx u so much. I m going to try it for my blog (:</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Keith</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-177</link>
		<author>Keith</author>
		<pubDate>Tue, 15 Aug 2006 17:57:10 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-177</guid>
					<description>&lt;p&gt;Great piece of tutorial, hope I will be able to &lt;a target="_blank" href="http://keith.hostmatrix.org/testbed"&gt;put to use here&lt;/a&gt;.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Great piece of tutorial, hope I will be able to <a target="_blank" href="http://keith.hostmatrix.org/testbed">put to use here</a>.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy Sharp</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-178</link>
		<author>Remy Sharp</author>
		<pubDate>Tue, 15 Aug 2006 18:29:40 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-178</guid>
					<description>&lt;p&gt;Speaking to John Resig of jQuery, you can use 'fadeInSpeed: 1400' to make the fade in effect uber smooth and slow.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Speaking to John Resig of jQuery, you can use 'fadeInSpeed: 1400' to make the fade in effect uber smooth and slow.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Henry</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-179</link>
		<author>Henry</author>
		<pubDate>Wed, 16 Aug 2006 05:02:26 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-179</guid>
					<description>&lt;p&gt;@Sam&lt;/p&gt;

&lt;p&gt;That's what I was curious about too, but after examining the source code, I realized how the concept works. What happens is the JavaScript code sends a timestamp among other things to a script you've created in the language of your choice (I used Perl) as often as you specify (in this case abut a second or two)  and for the example I created, the Perl code selects the row from a field in a table that has a timestamp later than the one sent by the JavaScript and sends that back to the spy page. Hope this helps.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Sam</p>
<p>That's what I was curious about too, but after examining the source code, I realized how the concept works. What happens is the JavaScript code sends a timestamp among other things to a script you've created in the language of your choice (I used Perl) as often as you specify (in this case abut a second or two)  and for the example I created, the Perl code selects the row from a field in a table that has a timestamp later than the one sent by the JavaScript and sends that back to the spy page. Hope this helps.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Sam</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-180</link>
		<author>Sam</author>
		<pubDate>Wed, 16 Aug 2006 10:40:16 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-180</guid>
					<description>&lt;p&gt;@Henry&lt;/p&gt;

&lt;p&gt;Thanks for the reply Henry, I figured it out and basically did the same as you but in PHP.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Henry</p>
<p>Thanks for the reply Henry, I figured it out and basically did the same as you but in PHP.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Daniel</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-181</link>
		<author>Daniel</author>
		<pubDate>Wed, 16 Aug 2006 21:13:59 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-181</guid>
					<description>&lt;p&gt;I decided to try out your script -- great work! I implemented it using my forum's database as recent data as to provide a dynamic feed of recent posts on the main page! Take a look: &lt;/p&gt;

&lt;p&gt;http://programming-designs.com&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I decided to try out your script -- great work! I implemented it using my forum's database as recent data as to provide a dynamic feed of recent posts on the main page! Take a look: </p>
<p>http://programming-designs.com</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: simon</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-182</link>
		<author>simon</author>
		<pubDate>Thu, 17 Aug 2006 15:28:28 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-182</guid>
					<description>&lt;p&gt;Great tutorial. I have tried the code and it worked on my PC. But it doesn't work on the Linux server.  Help!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Great tutorial. I have tried the code and it worked on my PC. But it doesn't work on the Linux server.  Help!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: simon</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-183</link>
		<author>simon</author>
		<pubDate>Fri, 18 Aug 2006 01:40:20 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-183</guid>
					<description>&lt;p&gt;Can you show the actual code for 
/jquery&lt;em&gt;spy/out&lt;/em&gt;json.php? I wonder what is the difference between your out.php and out_json.php,&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Can you show the actual code for<br />
/jquery<em>spy/out</em>json.php? I wonder what is the difference between your out.php and out_json.php,</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Fotis Evangelou</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-184</link>
		<author>Fotis Evangelou</author>
		<pubDate>Fri, 18 Aug 2006 10:27:36 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-184</guid>
					<description>&lt;p&gt;It really is a drag that the output file needs to... output one item at a time. As you said the ajax pings the output file in fixed intervals, requesting for new items.&lt;/p&gt;

&lt;p&gt;So, this makes it somewhat difficult to apply this script in a real situation, in a CMS. It is practical only for RSS feeds or sites with huge input, like Digg. You cannot use it to display in cyclic order the 10 most latest items in your website!&lt;/p&gt;

&lt;p&gt;What is nice about the script -and I guess everyone agrees on that- is the effect produced. So why not modify it to &#34;read&#34; several items at a time and display them in some order (by date, alphabetical etc.)...&lt;/p&gt;

&lt;p&gt;So at the moment I can't find a practical implementation of the script -although I'd love to!!- inside Joomla, as I previously rushed in to do.&lt;/p&gt;

&lt;p&gt;Don't get me wrong, it's very good  what you did, but unless it has practical applications you won't be seeing it implemented in many websites.&lt;/p&gt;

&lt;p&gt;Even the &#34;demo&#34; site you provide (Arsenal-Now) seems to fail to deliver (e.g. it displays double items)...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It really is a drag that the output file needs to... output one item at a time. As you said the ajax pings the output file in fixed intervals, requesting for new items.</p>
<p>So, this makes it somewhat difficult to apply this script in a real situation, in a CMS. It is practical only for RSS feeds or sites with huge input, like Digg. You cannot use it to display in cyclic order the 10 most latest items in your website!</p>
<p>What is nice about the script -and I guess everyone agrees on that- is the effect produced. So why not modify it to &quot;read&quot; several items at a time and display them in some order (by date, alphabetical etc.)...</p>
<p>So at the moment I can't find a practical implementation of the script -although I'd love to!!- inside Joomla, as I previously rushed in to do.</p>
<p>Don't get me wrong, it's very good  what you did, but unless it has practical applications you won't be seeing it implemented in many websites.</p>
<p>Even the &quot;demo&quot; site you provide (Arsenal-Now) seems to fail to deliver (e.g. it displays double items)...</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jack</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-185</link>
		<author>Jack</author>
		<pubDate>Sat, 19 Aug 2006 01:28:00 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-185</guid>
					<description>&lt;p&gt;Hi, I wanted to preload the latest 30 news entries then it to keep updating as new ones where made and fade out the old ones as new ones are made. So it keeps only 30 on screen.&lt;/p&gt;

&lt;p&gt;How is this possible with the script?&lt;/p&gt;

&lt;p&gt;Thanks, Jack.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, I wanted to preload the latest 30 news entries then it to keep updating as new ones where made and fade out the old ones as new ones are made. So it keeps only 30 on screen.</p>
<p>How is this possible with the script?</p>
<p>Thanks, Jack.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jason</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-186</link>
		<author>Jason</author>
		<pubDate>Sat, 19 Aug 2006 04:24:54 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-186</guid>
					<description>&lt;p&gt;I would certainly alos like to see the php push for rss...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I would certainly alos like to see the php push for rss...</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Ryan</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-187</link>
		<author>Ryan</author>
		<pubDate>Sat, 19 Aug 2006 15:43:32 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-187</guid>
					<description>&lt;p&gt;Remy, what do you recommend for the issue of not wanting to query the database constantly?  I'd LOVE to get something like this working on our forums, but with over 2.5 million posts, have EACH reader of the page that this jSpy is on, querying the database ever 2-3 seconds, we are going to kill the system.  Even with just me doing that on a sample testing page, I drove down system performance pretty badly.&lt;/p&gt;

&lt;p&gt;Two ideas I had were to query the database once every 5-10 minutes with a PHP script to get the last 150 posts (5 minutes at 2 seconds each) and put that into either a flat file or populate a small database.  Then each user would either access the flat file via the &#34;out.php&#34; file or query this much smaller db in the &#34;out.php&#34; file.  The only downside is that the only way to &#34;cycle&#34; through the results would be to keep a cookie on the users system to tell the out.php file what row of the db or file it last saw, so the out.php can grab the next one.  &lt;/p&gt;

&lt;p&gt;Do you see any other options for that?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Remy, what do you recommend for the issue of not wanting to query the database constantly?  I'd LOVE to get something like this working on our forums, but with over 2.5 million posts, have EACH reader of the page that this jSpy is on, querying the database ever 2-3 seconds, we are going to kill the system.  Even with just me doing that on a sample testing page, I drove down system performance pretty badly.</p>
<p>Two ideas I had were to query the database once every 5-10 minutes with a PHP script to get the last 150 posts (5 minutes at 2 seconds each) and put that into either a flat file or populate a small database.  Then each user would either access the flat file via the &quot;out.php&quot; file or query this much smaller db in the &quot;out.php&quot; file.  The only downside is that the only way to &quot;cycle&quot; through the results would be to keep a cookie on the users system to tell the out.php file what row of the db or file it last saw, so the out.php can grab the next one.  </p>
<p>Do you see any other options for that?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Ryan</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-188</link>
		<author>Ryan</author>
		<pubDate>Sat, 19 Aug 2006 16:48:24 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-188</guid>
					<description>&lt;p&gt;Okay, after looking at this page some more, i see that you have something you say: if you want to preload the page with rows, use this code...&lt;/p&gt;

&lt;p&gt;Well, that sounds like what I want to do, but I can't seem to get it to work.  Where should the script code go?  In the &#34;out.php&#34; file or in the &#34;spy.html&#34; file?  And what is &#34;#spyContainer&#34;?  Does that need to be renamed to something?  And do the div's need to be named something with an index? (it has &#34;div:gt(4)&#34; there).&lt;/p&gt;

&lt;p&gt;thanks for any help!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Okay, after looking at this page some more, i see that you have something you say: if you want to preload the page with rows, use this code...</p>
<p>Well, that sounds like what I want to do, but I can't seem to get it to work.  Where should the script code go?  In the &quot;out.php&quot; file or in the &quot;spy.html&quot; file?  And what is &quot;#spyContainer&quot;?  Does that need to be renamed to something?  And do the div's need to be named something with an index? (it has &quot;div:gt(4)&quot; there).</p>
<p>thanks for any help!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy Sharp</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-189</link>
		<author>Remy Sharp</author>
		<pubDate>Sun, 20 Aug 2006 18:57:46 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-189</guid>
					<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Though I've replied to most of these comments directly via email - I thought I might summarise my suggestions/feedback:&lt;/p&gt;

&lt;p&gt;@Simon - here's the source to the json example:&lt;/p&gt;

&lt;p&gt;http://leftlogic.com/jquery&lt;em&gt;spy/out&lt;/em&gt;json.php.txt&lt;/p&gt;

&lt;p&gt;@Jack + @Ryan - you should pre-populate the page as if you didn't have the spy functionality.  So long as each item is in a container div (the spy ignores the class or ids) and the collection of items is in a single container div that has an ID that you pass to the spy function it will work correctly (see the 'spy detail' code example).&lt;/p&gt;

&lt;p&gt;You don't need any naming on the item divs - the 'div:gt(4)' means all the divs after the &lt;em&gt;5th&lt;/em&gt; one.&lt;/p&gt;

&lt;p&gt;@Fotis - you've got my long reply!  But for those who had similar questions - I will be looking at a version of the spy that reads several items in at once in the near future.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Though I've replied to most of these comments directly via email - I thought I might summarise my suggestions/feedback:</p>
<p>@Simon - here's the source to the json example:</p>
<p>http://leftlogic.com/jquery<em>spy/out</em>json.php.txt</p>
<p>@Jack + @Ryan - you should pre-populate the page as if you didn't have the spy functionality.  So long as each item is in a container div (the spy ignores the class or ids) and the collection of items is in a single container div that has an ID that you pass to the spy function it will work correctly (see the 'spy detail' code example).</p>
<p>You don't need any naming on the item divs - the 'div:gt(4)' means all the divs after the <em>5th</em> one.</p>
<p>@Fotis - you've got my long reply!  But for those who had similar questions - I will be looking at a version of the spy that reads several items in at once in the near future.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jonathan Chong</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-190</link>
		<author>Jonathan Chong</author>
		<pubDate>Tue, 22 Aug 2006 17:35:16 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-190</guid>
					<description>&lt;p&gt;For those of you who want to use the Spy to track user activity on a website, I've set this up:
&lt;a href="http://www.arsenal-now.com/spy/audits.html"&gt;Arsenal Now site activity&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For those of you who want to use the Spy to track user activity on a website, I've set this up:<br />
<a href="http://www.arsenal-now.com/spy/audits.html">Arsenal Now site activity</a></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Matt</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-191</link>
		<author>Matt</author>
		<pubDate>Thu, 24 Aug 2006 18:59:43 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-191</guid>
					<description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;

&lt;p&gt;Could you please share how did you achieve this.... I am having a real hard time querying the DB. the bugger just dosen't work. Displays the first listing and then nothing after that.&lt;/p&gt;

&lt;p&gt;If you can help out, that would be great!
my email is:
Matt55_22@Yahoo.com&lt;/p&gt;

&lt;p&gt;thanks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Jonathan,</p>
<p>Could you please share how did you achieve this.... I am having a real hard time querying the DB. the bugger just dosen't work. Displays the first listing and then nothing after that.</p>
<p>If you can help out, that would be great!<br />
my email is:<br />
Matt55_22@Yahoo.com</p>
<p>thanks.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Fredrik</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-192</link>
		<author>Fredrik</author>
		<pubDate>Fri, 25 Aug 2006 09:37:10 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-192</guid>
					<description>&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;I did a simple example of out_json.php only in perl/cgi. It had three different lines of text which it randomly selected and print. Now to my problem, it printed the same line of text two times in a sequence. &lt;/p&gt;

&lt;p&gt;That shouldn't be possible should it?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I did a simple example of out_json.php only in perl/cgi. It had three different lines of text which it randomly selected and print. Now to my problem, it printed the same line of text two times in a sequence. </p>
<p>That shouldn't be possible should it?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: darkip</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-193</link>
		<author>darkip</author>
		<pubDate>Fri, 01 Sep 2006 12:51:09 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-193</guid>
					<description>&lt;p&gt;I'm pretty new to javascript but I can't seem to see the point in this:
var epoch = new Date(1970, 1, 1);
and then minus'ing that from the current date/time. It just seems to make the timestamp a month late...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I'm pretty new to javascript but I can't seem to see the point in this:<br />
var epoch = new Date(1970, 1, 1);<br />
and then minus'ing that from the current date/time. It just seems to make the timestamp a month late...</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Eric</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-194</link>
		<author>Eric</author>
		<pubDate>Fri, 01 Sep 2006 15:35:26 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-194</guid>
					<description>&lt;p&gt;Maybe someone can help me out with this. In a php file, how would I define the spycontainer around a variable? It will then be parsed out in a template.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Maybe someone can help me out with this. In a php file, how would I define the spycontainer around a variable? It will then be parsed out in a template.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Alejandro Sena</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-195</link>
		<author>Alejandro Sena</author>
		<pubDate>Mon, 11 Sep 2006 01:20:10 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-195</guid>
					<description>&lt;p&gt;Hey, great tool!. I've just finished this site (http://www.hayequipo.com/) for football (soccer) discussion. The "spy" shows users comments and blogs trackbacks, a lot of things can be done with this.&lt;/p&gt;

&lt;p&gt;Only one problem, the spy must support more than one row, that's the only thing left.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey, great tool!. I've just finished this site (http://www.hayequipo.com/) for football (soccer) discussion. The "spy" shows users comments and blogs trackbacks, a lot of things can be done with this.</p>
<p>Only one problem, the spy must support more than one row, that's the only thing left.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Alejandro Sena</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-196</link>
		<author>Alejandro Sena</author>
		<pubDate>Tue, 12 Sep 2006 12:24:25 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-196</guid>
					<description>&lt;p&gt;I've just find something strange: the $_POST timestamp is wrong. &lt;/p&gt;

&lt;p&gt;I was trying to grab more than one row at a time and find out that the $_POST timestamp give me this value 1155370514 (08/12/06)and the timestamp php function 1158059700 (09/12/06) in the same moment.&lt;/p&gt;

&lt;p&gt;Is this a problem in my server configuration? Really don't know, but I can't grab more than one row because the timestamp is one month behing the real date.&lt;/p&gt;

&lt;p&gt;I don't understand much about JS, that's why I can't modify the code, but the timestamp() in PHP is different than the $_POST["timestamp"] value.&lt;/p&gt;

&lt;p&gt;Hope you can help me in this one, greetings.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I've just find something strange: the $_POST timestamp is wrong. </p>
<p>I was trying to grab more than one row at a time and find out that the $_POST timestamp give me this value 1155370514 (08/12/06)and the timestamp php function 1158059700 (09/12/06) in the same moment.</p>
<p>Is this a problem in my server configuration? Really don't know, but I can't grab more than one row because the timestamp is one month behing the real date.</p>
<p>I don't understand much about JS, that's why I can't modify the code, but the timestamp() in PHP is different than the $_POST["timestamp"] value.</p>
<p>Hope you can help me in this one, greetings.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: darkip</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-197</link>
		<author>darkip</author>
		<pubDate>Tue, 12 Sep 2006 16:41:19 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-197</guid>
					<description>&lt;p&gt;Alejandro Sena:
I found the same thing it's the minusing of the 'epoch' which causes the timestamp to be a month late... Very confusing...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Alejandro Sena:<br />
I found the same thing it's the minusing of the 'epoch' which causes the timestamp to be a month late... Very confusing...</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Alejandro Sena</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-198</link>
		<author>Alejandro Sena</author>
		<pubDate>Tue, 12 Sep 2006 17:23:52 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-198</guid>
					<description>&lt;p&gt;time() - $_POST['timestamp'] is the amount of seconds missing. &lt;/p&gt;

&lt;p&gt;$_POST['timestamp'] + that number of seconds will give you the actual timestamp, just substract the refresh time and you have the correct time. &lt;/p&gt;

&lt;p&gt;Something like this (in a 5 seconds refresh period):&lt;/p&gt;

&lt;p&gt;$correct = $&lt;em&gt;POST['timestamp'] + ((time() - $&lt;/em&gt;POST['timestamp']) - 5);&lt;/p&gt;

&lt;p&gt;$correct will be the actual time minus your refresh time. You can put just $correct = time() - 5 and the result will be the same.&lt;/p&gt;

&lt;p&gt;It's not the right way to do it, but well, just have to wait for the creator answer. At least now I can load any number of rows at a time =)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>time() - $_POST['timestamp'] is the amount of seconds missing. </p>
<p>$_POST['timestamp'] + that number of seconds will give you the actual timestamp, just substract the refresh time and you have the correct time. </p>
<p>Something like this (in a 5 seconds refresh period):</p>
<p>$correct = $<em>POST['timestamp'] + ((time() - $</em>POST['timestamp']) - 5);</p>
<p>$correct will be the actual time minus your refresh time. You can put just $correct = time() - 5 and the result will be the same.</p>
<p>It's not the right way to do it, but well, just have to wait for the creator answer. At least now I can load any number of rows at a time =)</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: darkip</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-199</link>
		<author>darkip</author>
		<pubDate>Tue, 12 Sep 2006 20:37:58 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-199</guid>
					<description>&lt;p&gt;I've just written my own version of this, it supports multiple rows and doesn't require jQuery so i'm happy.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I've just written my own version of this, it supports multiple rows and doesn't require jQuery so i'm happy.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Alejandro Sena</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-200</link>
		<author>Alejandro Sena</author>
		<pubDate>Wed, 13 Sep 2006 06:38:58 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-200</guid>
					<description>&lt;p&gt;Sooo.... what are you waiting to share it?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sooo.... what are you waiting to share it?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Alejandro Sena</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-201</link>
		<author>Alejandro Sena</author>
		<pubDate>Wed, 13 Sep 2006 10:44:50 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-201</guid>
					<description>&lt;p&gt;This will probably solve the timestamp problem correctly:&lt;/p&gt;

&lt;p&gt;var timestamp = Date.parse(now) / 1000;&lt;/p&gt;

&lt;p&gt;That timestamp is the same that the time() function of PHP.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This will probably solve the timestamp problem correctly:</p>
<p>var timestamp = Date.parse(now) / 1000;</p>
<p>That timestamp is the same that the time() function of PHP.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: softius</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-202</link>
		<author>softius</author>
		<pubDate>Wed, 13 Sep 2006 17:33:02 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-202</guid>
					<description>&lt;p&gt;The problem is that the specified month for epoch is 1, which is February (Jan is 0, Feb is 1, Mar is 2 etc). All you have to do is to replace &lt;/p&gt;

&lt;p&gt;var epoch = new Date(1970, 1, 1);&lt;/p&gt;

&lt;p&gt;with&lt;/p&gt;

&lt;p&gt;var epoch = new Date(1970, 0, 1);&lt;/p&gt;

&lt;p&gt;It works on me! Thanks for the great plugin :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The problem is that the specified month for epoch is 1, which is February (Jan is 0, Feb is 1, Mar is 2 etc). All you have to do is to replace </p>
<p>var epoch = new Date(1970, 1, 1);</p>
<p>with</p>
<p>var epoch = new Date(1970, 0, 1);</p>
<p>It works on me! Thanks for the great plugin :)</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-203</link>
		<author>Remy</author>
		<pubDate>Thu, 14 Sep 2006 00:51:38 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-203</guid>
					<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;Thanks for pointing the bug in the timestamp.  I'll update the source code on this site very shortly.&lt;/p&gt;

&lt;p&gt;I've also been working on a new version of the spy that support multiple rows from the AJAX request and also supports custom timestamp functions.  &lt;/p&gt;

&lt;p&gt;It also supports collecting multiple items from the AJAX, and showing them at the specified timeout interval - giving the appearance of 'real-time'.&lt;/p&gt;

&lt;p&gt;I'm just ironing out the last of the bugs in the timeout "thread" and then I'll release it.&lt;/p&gt;

&lt;p&gt;It does use the version 1+ of jQuery - you will need to upgrade.&lt;/p&gt;

&lt;p&gt;I'll be in touch soon!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>Thanks for pointing the bug in the timestamp.  I'll update the source code on this site very shortly.</p>
<p>I've also been working on a new version of the spy that support multiple rows from the AJAX request and also supports custom timestamp functions.  </p>
<p>It also supports collecting multiple items from the AJAX, and showing them at the specified timeout interval - giving the appearance of 'real-time'.</p>
<p>I'm just ironing out the last of the bugs in the timeout "thread" and then I'll release it.</p>
<p>It does use the version 1+ of jQuery - you will need to upgrade.</p>
<p>I'll be in touch soon!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Alejandro Sena</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-204</link>
		<author>Alejandro Sena</author>
		<pubDate>Thu, 14 Sep 2006 04:26:53 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-204</guid>
					<description>&lt;p&gt;If the script can collect multiple items the only thing left is to do it from an XML file. That way you release a lot of server resources.&lt;/p&gt;

&lt;p&gt;I'm working on that but in other script, if everything goes right soon I'll post it here.&lt;/p&gt;

&lt;p&gt;Greetings.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>If the script can collect multiple items the only thing left is to do it from an XML file. That way you release a lot of server resources.</p>
<p>I'm working on that but in other script, if everything goes right soon I'll post it here.</p>
<p>Greetings.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Alejandro Sena</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-205</link>
		<author>Alejandro Sena</author>
		<pubDate>Thu, 14 Sep 2006 13:27:15 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-205</guid>
					<description>&lt;p&gt;Softius, the difference between the time() in PHP and the timestamp of the script (with the fixed epoch) is ~10800 (abour 3 hours).&lt;/p&gt;

&lt;p&gt;There must be something else. If you use a one-row system it's impossible for you to notice, 'cause the script don't repeat the last row, but in a multiple system (like the one that I'm trying to do) gives 3hs ago results with the epoch fix.&lt;/p&gt;

&lt;p&gt;Crazy, uh?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Softius, the difference between the time() in PHP and the timestamp of the script (with the fixed epoch) is ~10800 (abour 3 hours).</p>
<p>There must be something else. If you use a one-row system it's impossible for you to notice, 'cause the script don't repeat the last row, but in a multiple system (like the one that I'm trying to do) gives 3hs ago results with the epoch fix.</p>
<p>Crazy, uh?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: darkip</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-206</link>
		<author>darkip</author>
		<pubDate>Sun, 17 Sep 2006 10:59:11 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-206</guid>
					<description>&lt;p&gt;I found that even a slightly incorrect time on a users machine can mean that they miss rows because their timestamp is different to the one on the server. My solution is to send out a request to compare the users time to that of the server and then return the difference which is used to adjust the timestamp sent by further request.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I found that even a slightly incorrect time on a users machine can mean that they miss rows because their timestamp is different to the one on the server. My solution is to send out a request to compare the users time to that of the server and then return the difference which is used to adjust the timestamp sent by further request.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Alejandro Sena</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-207</link>
		<author>Alejandro Sena</author>
		<pubDate>Sun, 17 Sep 2006 17:42:29 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-207</guid>
					<description>&lt;p&gt;Darkip, the difference with the users time changes all the time. Now is 2 seconds and in a few seconds is 3, 4 or even 10.&lt;/p&gt;

&lt;p&gt;The solution is to store the last timestamp sended by spy.php (the database timestamp) and in the next query send the newest compared to it. Never use the client time, always the database one, just store the last time sended to the client.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Darkip, the difference with the users time changes all the time. Now is 2 seconds and in a few seconds is 3, 4 or even 10.</p>
<p>The solution is to store the last timestamp sended by spy.php (the database timestamp) and in the next query send the newest compared to it. Never use the client time, always the database one, just store the last time sended to the client.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Anon</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-213</link>
		<author>Anon</author>
		<pubDate>Mon, 09 Oct 2006 22:26:14 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-213</guid>
					<description>&lt;p&gt;Hi, I&#8217;m using this script and it works great, however is there anyway to keep the news from starting over? I want it to wait until there is a new news entry to add another &#8221;row&#8221;.&lt;/p&gt;

&lt;p&gt;Help would reeeally be appreciated. Thanks in advance!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m using this script and it works great, however is there anyway to keep the news from starting over? I want it to wait until there is a new news entry to add another &#8221;row&#8221;.</p>
<p>Help would reeeally be appreciated. Thanks in advance!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-212</link>
		<author>Remy</author>
		<pubDate>Thu, 12 Oct 2006 23:39:41 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-212</guid>
					<description>&lt;p&gt;The latest version of the &lt;a href="/info/articles/jquery_spy2"&gt;jquery spy&lt;/a&gt; supports multiple rows &#8211; and should do the job.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The latest version of the <a href="/info/articles/jquery_spy2">jquery spy</a> supports multiple rows &#8211; and should do the job.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Varun</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-209</link>
		<author>Varun</author>
		<pubDate>Sun, 05 Nov 2006 10:11:23 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-209</guid>
					<description>&lt;p&gt;Its cool.. but, I had a same problem as described by ryan:&lt;/p&gt;

&lt;p&gt;&#8220;Too many requests to the db.. solution &#8211; Two ideas I had were to query the database once every 5-10 minutes with a PHP script to get the last 150 posts (5 minutes at 2 seconds each) and put that into either a flat file or populate a small database. Then each user would either access the flat file via the &#8220;out.php&#8221; file or query this much smaller db in the &#8220;out.php&#8221; file&#8221;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Its cool.. but, I had a same problem as described by ryan:</p>
<p>&#8220;Too many requests to the db.. solution &#8211; Two ideas I had were to query the database once every 5-10 minutes with a PHP script to get the last 150 posts (5 minutes at 2 seconds each) and put that into either a flat file or populate a small database. Then each user would either access the flat file via the &#8220;out.php&#8221; file or query this much smaller db in the &#8220;out.php&#8221; file&#8221;</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-210</link>
		<author>Remy</author>
		<pubDate>Sun, 05 Nov 2006 16:27:18 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-210</guid>
					<description>&lt;p&gt;@Varun &#8211; if you use the latest &lt;a href="http://leftlogic.com/info/articles/jquery_spy2"&gt;jQuery spy&lt;/a&gt; you see that you can return multiple items from the AJAX request reducing the load on the database.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Varun &#8211; if you use the latest <a href="http://leftlogic.com/info/articles/jquery_spy2">jQuery spy</a> you see that you can return multiple items from the AJAX request reducing the load on the database.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: sahar</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-211</link>
		<author>sahar</author>
		<pubDate>Wed, 29 Nov 2006 13:57:39 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-211</guid>
					<description>&lt;p&gt;Is it possible to add sound alert with every new entry ?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Is it possible to add sound alert with every new entry ?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: John</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-214</link>
		<author>John</author>
		<pubDate>Thu, 07 Dec 2006 05:37:50 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-214</guid>
					<description>&lt;p&gt;Hi there, I wonder if there is  a way to run the script twice in a page (no iframes) ?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi there, I wonder if there is  a way to run the script twice in a page (no iframes) ?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Pushkar</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-219</link>
		<author>Pushkar</author>
		<pubDate>Wed, 07 Feb 2007 12:58:38 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-219</guid>
					<description>&lt;p&gt;I have madethis in ASP.But i  get problem while update database..Or any new data entry ocurre.I use prototype.js &#8230;Any one have suggestion..&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have madethis in ASP.But i  get problem while update database..Or any new data entry ocurre.I use prototype.js &#8230;Any one have suggestion..</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: hugo</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-220</link>
		<author>hugo</author>
		<pubDate>Thu, 01 Mar 2007 20:47:31 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-220</guid>
					<description>&lt;p&gt;I want add RSS! but i can&#8217;t :(&lt;/p&gt;

&lt;p&gt;please help me!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I want add RSS! but i can&#8217;t :(</p>
<p>please help me!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Collin</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-218</link>
		<author>Collin</author>
		<pubDate>Fri, 16 Mar 2007 07:57:06 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-218</guid>
					<description>&lt;p&gt;Hi Remy, this script looks great. Although I haven&#8217;t tried to implement it quite yet (I&#8217;ll wait till I&#8217;m on the clock =) ), I was wondering if you had an example similar to that of Arsenal-Now.com&#8217;s site where they show the spy in action, with reference to particular URLS that people are visiting &#8211; I would like to know how to use this same functionality so that I can get a live view of where users are at, at any given time on our site (aka live webstats). Thanks!
 &#8211; Collin&lt;/p&gt;

&lt;p&gt;ps &#8211; email me the response if easier for you seeing as its probably really indepth.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Remy, this script looks great. Although I haven&#8217;t tried to implement it quite yet (I&#8217;ll wait till I&#8217;m on the clock =) ), I was wondering if you had an example similar to that of Arsenal-Now.com&#8217;s site where they show the spy in action, with reference to particular URLS that people are visiting &#8211; I would like to know how to use this same functionality so that I can get a live view of where users are at, at any given time on our site (aka live webstats). Thanks!<br />
 &#8211; Collin</p>
<p>ps &#8211; email me the response if easier for you seeing as its probably really indepth.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Hugo Cabrera</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-217</link>
		<author>Hugo Cabrera</author>
		<pubDate>Mon, 26 Mar 2007 02:22:07 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-217</guid>
					<description>&lt;p&gt;Como hago funcionar el script de php out.php? disculpen sino escribo en ingles&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Como hago funcionar el script de php out.php? disculpen sino escribo en ingles</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: priscilla</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-215</link>
		<author>priscilla</author>
		<pubDate>Fri, 30 Mar 2007 17:38:02 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-215</guid>
					<description>&lt;p&gt;love the script. how can i make it pull from an xml file?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>love the script. how can i make it pull from an xml file?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy Sharp</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-216</link>
		<author>Remy Sharp</author>
		<pubDate>Fri, 30 Mar 2007 18:09:54 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-216</guid>
					<description>&lt;p&gt;@priscilla &#8211; you can, but you&#8217;ll need the latest &lt;a href="http://leftlogic.com/info/articles/jquery_spy2"&gt;jQuery spy&lt;/a&gt; and you&#8217;ll have to patch the &#8216;spy.parseItem&#8217; method to support XML.&lt;/p&gt;

&lt;p&gt;Let me know if you get stuck, I might be able to help.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@priscilla &#8211; you can, but you&#8217;ll need the latest <a href="http://leftlogic.com/info/articles/jquery_spy2">jQuery spy</a> and you&#8217;ll have to patch the &#8216;spy.parseItem&#8217; method to support XML.</p>
<p>Let me know if you get stuck, I might be able to help.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Sven</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-289</link>
		<author>Sven</author>
		<pubDate>Tue, 15 May 2007 10:33:28 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-289</guid>
					<description>&lt;p&gt;Man, great Script !
There's just something i dont understand, my Script is always in a loop. What i mean is it takes if there are 5 entrys in the DB it shows these 5 and startswith 1 again, how can i stop this, so that evere entry isshown once and the sriptonly updates, when there is something new?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Man, great Script !<br />
There's just something i dont understand, my Script is always in a loop. What i mean is it takes if there are 5 entrys in the DB it shows these 5 and startswith 1 again, how can i stop this, so that evere entry isshown once and the sriptonly updates, when there is something new?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: How to create a Digg-like spy with no work at all&#160;by&#160;Daily Web 2.0</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-311</link>
		<author>How to create a Digg-like spy with no work at all&#160;by&#160;Daily Web 2.0</author>
		<pubDate>Fri, 18 May 2007 18:05:19 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-311</guid>
					<description>&lt;p&gt;[...] is located here. For this article you need to have basic knowledge of jQuery [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] is located here. For this article you need to have basic knowledge of jQuery [...]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: jQuery spy - Ajax Compilation</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-633</link>
		<author>jQuery spy - Ajax Compilation</author>
		<pubDate>Fri, 08 Jun 2007 14:41:06 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-633</guid>
					<description>&lt;p&gt;[...] Website. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Website. [...]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: zonenoktaorg ödüllü seo yarışması &#187; Blog Arşivi &#187; ajax uygulamaları 3</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-717</link>
		<author>zonenoktaorg ödüllü seo yarışması &#187; Blog Arşivi &#187; ajax uygulamaları 3</author>
		<pubDate>Tue, 12 Jun 2007 18:43:49 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-717</guid>
					<description>&lt;p&gt;[...] jQuery spy [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] jQuery spy [...]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: ajax uygulamaları 3 : İnternet ve Yaşam</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-719</link>
		<author>ajax uygulamaları 3 : İnternet ve Yaşam</author>
		<pubDate>Tue, 12 Jun 2007 19:10:05 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-719</guid>
					<description>&lt;p&gt;[...] jQuery spy [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] jQuery spy [...]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Bernie</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-890</link>
		<author>Bernie</author>
		<pubDate>Sat, 23 Jun 2007 17:11:33 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-890</guid>
					<description>&lt;p&gt;Sven, did you ever figure this out?  I'd like to do the same.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sven, did you ever figure this out?  I'd like to do the same.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Emin</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-911</link>
		<author>Emin</author>
		<pubDate>Mon, 25 Jun 2007 12:05:31 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-911</guid>
					<description>&lt;p&gt;How can we show text in input ? 
for example i tried something like below but it dind't work; &lt;/p&gt;

&lt;p&gt;$(document).ready(function() {
    $('#text1').spy({'ajax': '/get.php'})
  });&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>How can we show text in input ?<br />
for example i tried something like below but it dind't work; </p>
<p>$(document).ready(function() {<br />
    $('#text1').spy({'ajax': '/get.php'})<br />
  });</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: linus</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-940</link>
		<author>linus</author>
		<pubDate>Tue, 26 Jun 2007 14:43:29 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-940</guid>
					<description>&lt;p&gt;hi, can provide a tutorial for xml data? will be useful for rss&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>hi, can provide a tutorial for xml data? will be useful for rss</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Remy Sharp</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-941</link>
		<author>Remy Sharp</author>
		<pubDate>Tue, 26 Jun 2007 14:46:06 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-941</guid>
					<description>&lt;p&gt;@Sven + Linus - if you check out the latest &lt;a href="http://leftlogic.com/info/articles/jquery_spy2" rel="nofollow"&gt;jQuery spy&lt;/a&gt; you might be able to achieve what you're after.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Sven + Linus - if you check out the latest <a href="http://leftlogic.com/info/articles/jquery_spy2" rel="nofollow">jQuery spy</a> you might be able to achieve what you're after.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: gabe</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-1016</link>
		<author>gabe</author>
		<pubDate>Mon, 02 Jul 2007 16:37:05 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-1016</guid>
					<description>&lt;p&gt;would anyone be interested in working on a memcached version of this. If 300 people are viewing the spy at the same time i think that would be pretty DB intensive.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>would anyone be interested in working on a memcached version of this. If 300 people are viewing the spy at the same time i think that would be pretty DB intensive.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: JQuery Spy &#38; Solar &#171; webm</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-5589</link>
		<author>JQuery Spy &#38; Solar &#171; webm</author>
		<pubDate>Fri, 16 Nov 2007 01:11:26 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-5589</guid>
					<description>&lt;p&gt;[...] listopad 16, 2007 @ 3:10 przed południem &#183; Zamieszczone w kategoriach Web   http://leftlogic.com/lounge/articles/jquery_spy [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] listopad 16, 2007 @ 3:10 przed południem &#183; Zamieszczone w kategoriach Web   http://leftlogic.com/lounge/articles/jquery_spy [...]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: jQuery spy : sastgroup.com</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-5787</link>
		<author>jQuery spy : sastgroup.com</author>
		<pubDate>Mon, 19 Nov 2007 20:12:19 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-5787</guid>
					<description>&lt;p&gt;[...] web: http://leftlogic.com/lounge/articles/jquery_spy   Share and Enjoy: These icons link to social bookmarking sites where readers can share and [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] web: http://leftlogic.com/lounge/articles/jquery_spy   Share and Enjoy: These icons link to social bookmarking sites where readers can share and [...]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Magnetbox - links for 2007-12-11</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-6772</link>
		<author>Magnetbox - links for 2007-12-11</author>
		<pubDate>Tue, 11 Dec 2007 02:23:55 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-6772</guid>
					<description>&lt;p&gt;[...] How to create a Digg-like spy with no work at all (tags: ajax digg work) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] How to create a Digg-like spy with no work at all (tags: ajax digg work) [...]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: דברים שאפשר לעשות עם RSS &#124; We CMS</title>
		<link>http://leftlogic.com/lounge/articles/jquery_spy/#comment-16512</link>
		<author>דברים שאפשר לעשות עם RSS &#124; We CMS</author>
		<pubDate>Sat, 17 May 2008 16:55:37 +0000</pubDate>
		<guid>http://leftlogic.com/lounge/articles/jquery_spy/#comment-16512</guid>
					<description>&lt;p&gt;[...] משחקים שונים עם RSS. לסיום, אציין אחד נוסף שאהבתי, jquery spy (הדגמה) שמאפשר להציג תכנים בדומה ל- Digg [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] משחקים שונים עם RSS. לסיום, אציין אחד נוסף שאהבתי, jquery spy (הדגמה) שמאפשר להציג תכנים בדומה ל- Digg [...]</p>
]]></content:encoded>
				</item>
</channel>
</rss>
