Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

checkdnsrr not supported on Windows?

1 view
Skip to first unread message

Karl-Arne Gjersøyen

unread,
Sep 4, 2010, 7:54:21 AM9/4/10
to
Hello again. Sorry that I am flooding the forum. But can somebody tell
me if checkdnsrr is supported or not on Windows?

I have tried different examples that I get through google.com and the
PHP manual, but no-one of them work.

Here is one of them I have tried:
(Well, I have put some echo sentence i addition into the example from web.)

function valid_email_address($mail = ''){
if( (preg_match('/(@.*@)Ś(\.\.)Ś(@\.)Ś(\.@)Ś(^\.)/', $mail)) ||
(preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}Ś[0-9]{1,3})(\]?)$/',$mail))
) {
$host = explode('@', $mail);
if(checkdnsrr($host[1].'.', 'MX')){
echo "<p>MX record is found!</p>";
return true;
}
if(checkdnsrr($host[1].'.', 'A')){
echo "<p>A record is found!</p>";
return true;
}
if(checkdnsrr($host[1].'.', 'CNAME')){
echo "<p>CNAME record is found</p>";
} return true;
}
echo "<p>No records is found!</p>";
return false;
}

Karl

Jerry Stuckle

unread,
Sep 4, 2010, 9:16:30 AM9/4/10
to
On 9/4/2010 7:54 AM, Karl-Arne Gjersøyen wrote:
> Hello again. Sorry that I am flooding the forum. But can somebody tell
> me if checkdnsrr is supported or not on Windows?
>
> I have tried different examples that I get through google.com and the
> PHP manual, but no-one of them work.
>
> Here is one of them I have tried:
> (Well, I have put some echo sentence i addition into the example from web.)
>
> function valid_email_address($mail = ''){
> if( (preg_match('/(@.*@)¦(\.\.)¦(@\.)¦(\.@)¦(^\.)/', $mail)) ||
> (preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}¦[0-9]{1,3})(\]?)$/',$mail))

> ) {
> $host = explode('@', $mail);
> if(checkdnsrr($host[1].'.', 'MX')){
> echo "<p>MX record is found!</p>";
> return true;
> }
> if(checkdnsrr($host[1].'.', 'A')){
> echo "<p>A record is found!</p>";
> return true;
> }
> if(checkdnsrr($host[1].'.', 'CNAME')){
> echo "<p>CNAME record is found</p>";
> } return true;
> }
> echo "<p>No records is found!</p>";
> return false;
> }
>
> Karl

http://us3.php.net/manual/en/function.checkdnsrr.php

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

0 new messages