Hi,
I was wondering if somebody knows a simple way to update a (status) text in PHP without refressing. The situation is as follows;
I have a class that scrawls a domain and gathers the keyword denstity of a certain page within that domain. Now I want to show the user what the status is of the task (in %). Maybe I can use ob_flush() or flush() in combination with IFRAMES, but I prefer to don't. The problem with AJAX for as far as I know is that it won't accept flush and you cant make it holding a connection online (readystate -it just accepts status 3/4-).
On the otherside I also want the script to run on the background. So the user can still surf on the website while the script is generating. When the script is ready it should attent the user (with a popup or something).
I can do that by listening to a socket till the script is done but I dont know if that is the best way.
I was wondering if somebody knows a simple way to update a (status) text in PHP without refressing. The situation is as follows;
I have a class that scrawls a domain and gathers the keyword denstity of a certain page within that domain. Now I want to show the user what the status is of the task (in %). Maybe I can use ob_flush() or flush() in combination with IFRAMES, but I prefer to don't. The problem with AJAX for as far as I know is that it won't accept flush and you cant make it holding a connection online (readystate -it just accepts status 3/4-).
On the otherside I also want the script to run on the background. So the user can still surf on the website while the script is generating. When the script is ready it should attent the user (with a popup or something).
I can do that by listening to a socket till the script is done but I dont know if that is the best way.
Comment