title: PHP ipv6 support in fsockopen()
body: <p>We are using PHP and <code>fsockopen()</code> to check if a host is available. It works great for standard ipv4 addresses, but recently we started adding ipv6 addresses and it fails. According to the PHP documentation for <code>fsockopen()</code> we simply just need to enclose the ipv6 address in brackets for ipv6 support.</p>
  
  <pre><code>fsockopen('[2a03:b0c0:3:d0::14a:e001]', 80, $return_error_number, $return_error, 10);
  </code></pre>
  
  <p>However, we are always getting:</p>
  
  <pre><code>Network is unreachable
  </code></pre>
  
  <p>Does the server running PHP need to support ipv6 as well for this to work? Any other gotchas?</p>