title: SRV record lookup with PHP
body: <p>If you type</p>
  
  <pre><code>nslookup -type=SRV _xmpp-server._tcp.gmail.com
  </code></pre>
  
  <p>(or use the dig command in OSX) you get some SRV records relating to google chat</p>
  
  <p>I would like to replicate this functionality in PHP, does anyone have any good ideas how to do this?</p>
  
  <p>I would like to avoid using exec() as this does not return 100% standard responses across OSX/*NIX/WINDOWS</p>
  
  <p>Thanks!</p>