Thanks! Do you know how to get access to pear libraries? do I have to install something in my LAMP setup?
or is it only a library of php classes I can download?
regards, Øyvind
Main Topics
Browse All Topicsphp function gethostbyname('mydomain.co
anyone know how to specify wich dns php is supposed to ask?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
if you are running LAMP, chances are that you already have PEAR installed. You just need to run (from console)
pear install Net_DNS
and pear will automatically install needed package.
But there are several possible ways to install PEAR, read PEAR's manual on installation (http://pear.php.net/manua
Business Accounts
Answer for Membership
by: German_RummPosted on 2007-03-04 at 15:48:03ID: 18651637
PHP's gethostbyname() asks OS for DNS information. If you want more control, try PEAR's Net_DNS package:
/en/packag e.networki ng.net-dns .php
.com');
http://pear.php.net/manual
Using it, you can set nameservers to query (example from the docs for query()):
$resolver = new Net_DNS();
$resolver->nameservers = array('198.41.0.4', '192.228.79.201');
$response = $resolver->query('mydomain