Without using PECL or system() type functions, is there a way to look up DNS records using PHP?

Posted by Navarr on Stack Overflow See other posts from Stack Overflow or by Navarr
Published on 2010-05-25T18:54:01Z Indexed on 2010/05/25 19:01 UTC
Read the original article Hit count: 172

Filed under:
|
|

I'm working on creating a new type of email protocol, and in order to do that I had to set up an SRV DNS record for my domain.

In promoting this protocol, I'll need to be able to discover if a given host uses my system (and if not fall back to an older protocol).

So, is there a way to pull a DNS record (such as SRV) using PHP without using a PECL extension or running it through the linux command line (I already know I can ob_start() and system("host -t SRV hostname") but I'm looking for a better way, if it exists.)

© Stack Overflow or respective owner

Related posts about php

Related posts about dns