By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

checkdnsrr()

P: n/a
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?
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Use:

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

---
Steve

Jul 17 '05 #2

P: n/a
Douglas F. wrote:
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?


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.
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.