SRV record lookup with PHP
问题 If you type nslookup -type=SRV _xmpp-server._tcp.gmail.com (or use the dig command in OSX) you get some SRV records relating to google chat I would like to replicate this functionality in PHP, does anyone have any good ideas how to do this? I would like to avoid using exec() as this does not return 100% standard responses across OSX/*NIX/WINDOWS Thanks! 回答1: You could use Pear Net_DNS. I managed to get this to work on Linux, but haven't tested it on Windows or any others: require_once('Net