title: fsockopen only working to check port 80 and 8000 (no other ports)
body: <p>I'm trying to use fsockopen as a port checker to see if a specific port is open on an IP address, but it only seems to be working on Ports 80 and 8000. For any other port, it returns that the port is closed even when it is open. I was wondering how I could possibly fix this? </p>
  
  <pre class="lang-php prettyprint-override"><code>$server_ip= $_POST['server']; 
  $port = $_POST['port'];
  $server_ip = gethostbyname($server_ip);
  $status = array();
  
  if (empty($_POST["server"]) || empty($_POST['port']) || !filter_var($server_ip, FILTER_VALIDATE_IP) )
  {
      echo "some html code";
  }
  
  elseif (!(is_numeric($port)))
  {
      echo "some other html code";
  }
  
  else
  {
      if($pf = @fsockopen($_POST['server'], $port, $err, $err_string, 1)) {
          $status = true;
          fclose($pf);
      } else {
          $status = false;
      }
  
  Output code here..
  }
  </code></pre>