1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Online/Offline Query?

Discussion in 'PHP' started by JuggernautH, Sep 17, 2008.

  1. #1
    Hi, running a swedish clan site and now i'm trying to make a little panel for the site that shows our war server to the clan members along with some other info. However i do wish to make it say Server Offline if it's not online, is there someone that could help me put a little snippet together to get the status of the server and if it's offline to make it show the text Server Offline if it is?

    The usual port for counter-strike servers isf 27015 and that's the port needed to get the status of, any help is appriciated :)
     
    JuggernautH, Sep 17, 2008 IP
  2. happpy

    happpy Well-Known Member

    Messages:
    926
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    120
    #2
    is it so, that the server is totally offline from the web?
    or is it only the CS-server function that gets turned off?
     
    happpy, Sep 17, 2008 IP
  3. JuggernautH

    JuggernautH Guest

    Messages:
    2,116
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Well i've played around with some php stuff, what i want to do is query the actual port 27015 or ping it or something to get a answer challenged. However i do not know how to do it, if the server answers the challenge it should show the server info and if it does not reply to the challenge it should say Server Offline.

    Now if the server is offline the site doesn't even work.
     
    JuggernautH, Sep 17, 2008 IP