title: Force PHP Script Connections use IPV4 instead of IPV6
body: <p>I started using ipv6 in my server but I ran in some issues, for example to send a notification to Android and iOS, it wasn't deliverying, so I solved the android notification issue by adding </p>
  
  <blockquote>
    <p>curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);</p>
  </blockquote>
  
  <p>PHP is making all output connections (like curl, stream_context, fwrite to URL)  using IPV6 , instead of IPV4 , is there a global way (in script) to define php to only use IPV4 in those requests instead of IPV6 ? My server has both IPV4 and IPV6 enabled.
  I don't  want to disable IPV6 because some people that access my site are IPV6 only users.</p>