zone widget

Results 1 to 4 of 4
  1. #1
    Proficient Member josh2k7 is offline
    MemberRank
    Jun 2012 Join Date
    181Posts

    zone widget

    hey you guys you know when u go to a server web site and you look to see if it is online how do i get that on my website
    Last edited by josh2k7; 30-06-12 at 08:49 PM.


  2. #2
    Account Upgraded | Title Enabled! Flash1369 is offline
    MemberRank
    Oct 2011 Join Date
    892Posts

    Re: zone widget

    some php script, its on bakey's release. though you need his password and i wont give it out here :X

  3. #3
    Coeven Tronic is offline
    MemberRank
    Apr 2010 Join Date
    LocalhostLocation
    238Posts

    Re: zone widget

    ;0 or read one of the 3153151351315661361 guides about ping a server in php lol

  4. #4
    Member cieto12345 is offline
    MemberRank
    Dec 2011 Join Date
    77Posts

    Re: zone widget

    You could use this easy function snippet:

    PHP Code:
    <?php

    //  Returns value 0 (Server is offline) or 1 (Server is online)
    //  ex.: 
    //  if(Serverstatus("127.0.0.1", "80") == 0)
    //  {
    //  echo "Offline";
    //  }
    //  else
    //  {
    //  echo "Online";
    //  }

    function Serverstatus($ip$port)
    {
    $con = @fsockopen($ip$port$errno$errstr1);
    if(!
    $con)
    {
    fclose($con);
    return 
    0;
    }
    else
    {
    fclose($con);
    return 
    1;
    }
    }

    ?>
    Example for trying to access Zone 1:

    PHP Code:
    <?php

    if(Serverstatus("YOUR SERVERIP""9120") == 0)
    {
    echo 
    "Zone 1 is offline!";
    }
    else
    {
    echo 
    "Zone 1 is online!";
    }

    function 
    Serverstatus($ip$port)
    {
    $con = @fsockopen($ip$port$errno$errstr1);
    if(!
    $con)
    {
    fclose($con);
    return 
    0;
    }
    else
    {
    fclose($con);
    return 
    1;
    }
    }

    ?>



Advertisement