title: PHP Server Status code error
body: <p>I am trying to make a server status page for my game server and the code ends up not showing if the server is online.</p>
  
  <pre><code>&lt;?PHP 
  $ts_ip = "177.82.148.141"; 
  $ts_port = "2505"; 
  
  $output = @fsockopen("$ts_ip", $ts_port, $errno, $errstr, 2);  
  stream_set_timeout($output, 00002);
  
  if (!$output) { 
      echo "&lt;FONT COLOR=#DD0000&gt;&lt;B&gt;FEB Offline&lt;/B&gt;&lt;/FONT&gt;"; 
  } else { 
      echo "&lt;FONT COLOR=#00DD00&gt;&lt;B&gt;FEB Online&lt;/B&gt;&lt;/FONT&gt;"; 
  } 
  @fclose($output); 
  ?&gt;
  </code></pre>
  
  <p>It also gives me this error:</p>
  
  <blockquote>
    <p>Warning: stream_set_timeout() expects parameter 1 to be resource, boolean given in /home/u918484727/public_html/teste.php on line 6</p>
  </blockquote>
  
  <p>May someone help me?</p>