On Fri, Dec 28, 2001 at 05:00:20PM +0100, Edwin Boersma wrote: > At 16:51 28-12-01, you wrote: > >On Fri, Dec 28, 2001 at 04:30:33PM +0100, Edwin Boersma wrote: > > > Hi there, > > > > > > My provider stopped the DNS service on the server that runs mySQL and > > > PHP. By result, the function GetHostByAddr() is useless. Can I tell PHP > > > to use another DNS server to lookup the IP-address? > > > >No PHP uses whatever is configured on the system. PHP just does the > >gethostbyaddr() call, and the system does the rest. One solution > >could be to call an external program like host or something. host > >can be told to use a specific nameserver, and does not depend on > >system configuration. > > > >Stig > > Hmm, not a very satisfying answer. I don't know of any Linux program, that
I know it's not very satisfying, but on most Linux installations you have the program called "host". Try "host ipaddress serveraddress". If you have this, it is simple to call the program from PHP and use the output. > does what you suggest. Wouldn't it be handy to extend the function (or have > another one), so that it can use any DNS server, that is parsed to the > function? Sorry, but I'm against adding all that extra code for a special case like this. Personally I would say that if service provider blocked DNS, then the provider is the problem. If provider wants to, he can block all DNS lookups going out from the box. I'm cc-ing this to php-dev. Stig -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]