Refresh page when directory content changes
<p>I am working on an online jQuery slideshow for showing the latest scores for a local sport community. The slides are images, made from a Powerpoint presentation, which are automatically synced with a directory on my Centos6 server using the Windows program Autover.</p>

<p>For a good user experience it would be great when the page is refreshed when the images are updated (or show some text that the scores are updated and let the user refresh). I could set a meta refresh, for refreshing the page every 10 minutes but thats not an ideal solution.</p>

<p>Browsing other topics I found out that it is not possible to monitor a server directory using only Javascript.</p>

<p>My idea is now to make a php script to which returns true (changed) or false (not changed), and call this script from the slideshow webpage every 5 minutes using javascript. </p>

<p>For the php script I read some topics using these solutions:</p>

<ul>
<li>Inotify-tools (which is not installed by default on Centos)</li>
<li>FAM (could be outdated?)</li>
<li>Making a md5 hash of the directory, and compare this with a previous hash.</li>
</ul>

<p>Which of the solutions above is the best way to go? Could someone provide me with an php example? Unfortunately my php skills are not so good.</p>
