Block fsockopen() errors
<p>I would like to block the errors that fsockopen() gives me. </p>

<blockquote>
  <p>(Warning: fsockopen() [function.fsockopen]: unable to connect to 50.31.65.135:27015 (Connection timed out) in /home/reverbga/public_html/query/query.php on line 6)</p>
</blockquote>

<p>I just want it to not show that, as I use fsockopen as a way to see if the server is online.</p>

<p>This is my code:</p>

<pre><code>&lt;?php
$serialized = file_get_contents('http://module.game-monitor.com/50.31.65.135:27015/data/server.php');
$players = unserialize($serialized);
$array = (array) $players;

$fp = fsockopen("50.31.65.135", 27015, $errno, $errstr, 1);

if (!$fp) {
    echo "&lt;img width='20' height='20' src='bullet_red.png' /&gt;OCRP: OFFLINE";
}
else {
    echo "&lt;img width='20' height='20' src='bullet_green.png' /&gt;OCRP: {$array['player']}/{$array['maxplayer']}";
}

?&gt;
</code></pre>
