Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    ping in web browser


    Hello to all,

    I have a problem, I want to show the ping in my web browser, but when I implement the code, it process it first, then shows it, I mean...the browser waits until all the pings are done and then it shows all of them like a static web page and not like running a ping from a terminal.

    How can i solve that problem??...this are the lines of code that i have implemented:

    if ($unix)
    {
    system ("ping -c$count -w$count $host");
    system("killall ping");// kill all ping processes in case there are some stalled ones or use echo 'ping' to execute ping without shell
    }
    else
    {
    system("ping -n $count $host");
    }
    echo '</pre>';



    is anything wrong with that??

    tks for your answers

  2. #2
    Hello,

    that's totally normal. PHP is a server side language and it treats the informations you send and then send back a result in on time.

    If you want to get the data in real time from the server, you have to go through some Ajax. You will probably get more help on a forum about web programming

    Hope this helps.

  3. #3
    Xzan

    tks a lot, i'll check it out on ajax

    regards,

  4. $spacer_open
    $spacer_close

Posting Permissions

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