Javascript setInterval function
<p>I have a page where it shows users posts and refreshes automatically using the jQuery setInterval function.</p>

<pre><code>$(document).ready(function(){
setInterval(function() {
      $('#content').load('test.php');
}, 5000);
});
</code></pre>

<p>But the problem is I am going to have to create a duplicate page called test.php containing the same content which will be called every 5 seconds. I don't want people just viewing the source and finding the page with all the data on.</p>

<p>For example this site has a recent forum topics page which updates every couple of seconds,
<a href="http://awesomescreenshot.com/0d4o0n2e0" rel="nofollow">http://awesomescreenshot.com/0d4o0n2e0</a></p>

<p>I look in the page source and find the link to the page and this is what I find
<a href="http://awesomescreenshot.com/0a2o0n691" rel="nofollow">http://awesomescreenshot.com/0a2o0n691</a></p>

<p>I don't want people to be able to find that...</p>

<p>Is there a better way round this jQuery function? E.g. calling a php function to just run the query which will be in the test.php file?</p>
