1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

make ping with PHP

Discussion in 'PHP' started by guif, Oct 8, 2008.

  1. guif

    guif New Member

    I would like to make a simple monitoring. I make this:

    $ip = $_SERVER[''];
    exec("ping -n 4 $ip 2>&1", $output, $retval);
    if ($retval != 0) { 
    echo "no!"; 
    echo "yes!"; }
    I use my internal IP:
    The result is: NO!

  2. asha

    asha New Member

    What platform are you running the script on?

Share This Page