Questions | Login

Top / PHP

PHP code to display some kind of busy image/icon until a process is complete?

demo 24 Dec 2008 01:45am
I am having an exec() function in my code which invokes a shell script to convert an mp3 file into flv format.
Now this conversion takes some time say around 4-5 minutes if the file is large. During this time I want to show some kind of busy icon with message asking the user to be patient. How to write in the code?

Answers

demo 24 Dec 2008 01:53am
http://www.stonehenge.com/merlyn/LinuxMag/col39.html shows how to do it in Perl. The principles are the same in any language, so you should be able to port it.
demo 24 Dec 2008 02:05am
Just time a redirect like this;

<meta http-equiv="refresh" content="10;url=http://localhost/">

But if you're looking for content for them to see, make an animation or photo in PSP or Animation Shop and put it in a seperate HTTP header that you forward them to while the event runs it's course, something like this;

<?php
header( 'Location:
http://www.mysite.com/file/name.php'
) ;
?>

Sorry if that's not what you're looking for.

Related

Submit Answer

You must be logged in to post an answer. Please Login or Register.

Powered by phpMyAnswers.