In general, you will need to use one of the various ways to pass a command to an external application (probably the dig, host, or nslookup command). In PHP, you can use [MAN]exec[/MAN], [MAN]passthru[/MAN], [MAN]popen[/MAN], or the backtick operator to pass a command to whatever command you want to read the DNS entries.
But to decide which DNS tool is most appropriate, I'll need to know a little more about what you're trying to accomplish.