Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2011
    Thanked 0 Times in 0 Posts

    Check if Server is online or offline?

    Do I post this here? Haha, have no idea which.

    I play a game called terraria. And I wanted to see make a server list. But I have no way of knowing if a server is online or offline. Is there a way to make a script to check then have a picture if its online or offline?

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Your Monitor
    Thanked 527 Times in 514 Posts
    Blog Entries
    Yes there are several ways. If the server has a http server then you can perform a call to a page or file and check for a 200 status code, you can attempt to connect to a port, you can ping it...

    There are many ways to see if a server is up and running, you just have to decide what suits you best.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!


    Posting Permissions

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