Results 1 to 4 of 4

Thread: display something untill the php returns value

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    111

    Arrow display something untill the php returns value

    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

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: display something untill the php returns value

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    111

    Re: display something untill the php returns value

    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

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: display something untill the php returns value

    Check out the Ajax link in my signature.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width