No response from chkdnssr

The place for general PHP questions and hints for PHP on IBM i

No response from chkdnssr

Postby ssonntag on Thu Apr 19, 2012 10:30 pm

I'm attempting to retrieve DNS record information about mail servers for email address from from our iSeries database and use the following code, where the host name is extacted from the email address:

if (checkdnsrr($host, DNS_MX))
{
echo "Valid DNS record <br>";
return true;
}
else {
echo "InValid DNS record <br>";
return false;

I get a blank array of dns records not matter what domain name I use.

Is there something special about attempting this in an iSeries environment that someone else has had experience with?

thanks,

Scott Sonntag
ssonntag
 
Posts: 1
Joined: Thu Apr 19, 2012 10:22 pm

Re: No response from chkdnssr

Postby htoshmatov on Tue Jan 22, 2013 5:43 am

try your host in quotes, like this
checkdnsrr("$host")

that should work
Thanks,
Sincerely,
Jon Toshmatov
A Zend PHP 5.3 Certified Engineer and
Certified Oracle DBA.
www.toshmatov.us
Dubuque, Iowa - Chicago, IL USA
425-940-0835
htoshmatov
 
Posts: 4
Joined: Thu Oct 11, 2012 3:45 am
Location: Dubuque, Iowa


Return to PHP Questions / Hints

Who is online

Users browsing this forum: No registered users and 1 guest