I want to show an loading GIF while my PHP-script is working, small ex:
HTML CODE WITH LOADING.GIF
PHP CODE
sleep(5)
echo("<script>location.href = 'http://www.google.com';</script>");
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?