Show loading image while PHP work
<p>I want to show an loading GIF while my PHP-script is working, small ex:</p>

<p>HTML CODE WITH LOADING.GIF</p>

<p>PHP CODE </p>

<pre><code>sleep(5)
echo("&lt;script&gt;location.href = 'http://www.google.com';&lt;/script&gt;");
</code></pre>

<p>If i run this example the page will load in 5 seconds, then show me the loading.gif in 0.3seconds and then send me to google. Is there any way to load all html to the browser then runt the PHP-script? </p>
