net/dns.php and checking validity of e-mail hostnames

From: Date: Sun, 22 Aug 2004 10:12:45 +0000
Subject: net/dns.php and checking validity of e-mail hostnames
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14213@lists.php.net to get a copy of this message
Hey all - after checking the minialist documentation, I've found that read_config() is pretty much mandatory on windows systems... not checked on my linux box yet. Would it be feasible to add an option where if a query is called without first calling read_config it would just use localhost? I thought I was going mad, assuming that the code fragment would be a nice little cross platform replacement of getmxrr() $dns->nameservers() throws an error on my system (Could of course be an xp issue) Here's what I'm using instead: $dnsres = new Net_DNS_Resolver(); $dnsres->read_config(INCLUDES_DIR . "resolv.conf"); $resolved = $dnsres->("mydomain.com", "CNAME"); if($resolved == false) echo "failed"; else echo "succeeded"; where resolv.conf simply defines localhost at the moment. without it, will always return false. Any thoughts you can offer? Many thanks, Scott

« previous php.pear.general (#14213) next »