1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Forum Description - Online/Offline Status - PHP

Discussion in 'XenForo Development Discussions' started by ChillaxOwner, Jun 22, 2013.

  1. ChillaxOwner

    ChillaxOwner Active Member

    Hello, I own a gaming community called Chillax Gaming and I am trying to set it so before going into a section with the forums for each section, it will say on the description if the server is online or not.

    For example
    $httpcheck = @fsockopen('your ip address', 80, $error, $errstr, 1);
    if ($httpcheck) {
          echo "<img src=\"MyOnlineImageUrl\">";
      } else {
          echo "<img src=\"MyOnlineImageUrl\">";
    Would go into the description

    How would I get this to work?
    It spits out
    "; } ?>

Share This Page