PDA

Click to See Complete Forum and Search --> : display something untill the php returns value


lordadel
Mar 5th, 2008, 07:00 AM
Hello

I want to know how can i display something untill php returns a value

example:

the server is gathering data from several sites Site A , Site B and Site C

while the server is gathering data from Site A i want it to display "gathering data" besides "Site A" and when it returns a value i want it to display "Finished" and the same thing for Site B and Site C.

i know this also will include javascript...

can someone give me alittle help in that i have tried searching and couldn't find any examples

Cheers
Adel

visualAd
Mar 5th, 2008, 12:47 PM
The a look for the XMLHTTPRequest object in Javascript, it will enable you to make a request periodically and update the status. You don't need to use Javascript, you could use output buffers. But I would not recommend that because it will give you only limited control over the process.

Don't forget also the ignore_user_abort() function if you don't want the user to stop it by pressing the stop button in the browser.

lordadel
Mar 6th, 2008, 02:18 PM
Thanks alot for Your reply

but Can you give me just a small code example?

like i want it to send a request every 1 second to File.php where this file will return an output then print that output on everyrequest untill the output is equal to Something then it stops sending requests...

Thanks Alot for your help in advance

visualAd
Mar 6th, 2008, 02:36 PM
Check out the Ajax link in my signature.