Connecting Tech Pros Worldwide Help | Site Map

checkdnsrr()

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 10:00 AM
Douglas F.
Guest
 
Posts: n/a
Default checkdnsrr()

I am using checkdnsrr() to validate a post of an email address. How can the
call be if'd by determining if it is an Unix system (or Windows system) so
an error won't pop up if it is a Windows system?



  #2  
Old July 17th, 2005, 10:00 AM
Steve
Guest
 
Posts: n/a
Default Re: checkdnsrr()


Use:

if( function_exists( 'checkdnsrr' ) )
{
....
}
else
{
// not defined: probably Windows...
}

---
Steve

  #3  
Old July 17th, 2005, 10:03 AM
Mark
Guest
 
Posts: n/a
Default Re: checkdnsrr()

Douglas F. wrote:
[color=blue]
> I am using checkdnsrr() to validate a post of an email address. How can
> the call be if'd by determining if it is an Unix system (or Windows
> system) so an error won't pop up if it is a Windows system?[/color]

somebody else suggested check_function_exists, which is an excellent
solution. You can also look in $_SYSTEM['OS']. If it is set and to
Windows_NT or something, then you are likely on a windows system. Most
Unix-like operating systems will set $_SYSETM['OSTYPE'].

If you look at http://www.php.net/checkdnsrr, you will see in the user
comments at the bottom many solutions to the lack of a Windows version of
this function. Check it out.

mark.


--
I am not an ANGRY man. Remove the rage from my email to reply.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.