title: Resolve hostname in PHP using different name server
body: <p>How I can resolve hostname to IP address using PHP,
  but using different nameserver (eg. <a href="http://www.opendns.com/">OpenDNS</a> or <a href="https://developers.google.com/speed/public-dns/">Google Public DNS</a>).</p>
  
  <p>It not seem that <code>dns_get_record()</code> or <code>gethostbyname()</code> are able to use a different nameserver than one currently set up on the system (in TCP/IP settings or in <code>/etc/resolv.conf</code>).</p>
  
  <p>The only way I've found is using PEAR class Net/DNS, but it gives me lots of warnings under PHP 5.4</p>