473,322 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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?
Jul 17 '05 #1
2 3568

Use:

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

---
Steve

Jul 17 '05 #2
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Danol | last post by:
How can i check if subdomain exists? DNS or what? And how ? thx
0
by: John | last post by:
What is the best function to check if a domain name exists. I had read somewhere that checkdnsrr() can do the job, but unfortunately it is not giving correct result all the time. For example it...
9
by: Ted G | last post by:
Hello, I'm new wiyh PHP and would like to ask, what is the common way to check if directory path e.g. in url and file requested are in proper format? E.g. if I would give my homepage URL in...
4
by: vishal | last post by:
how can i verify the email address entered by client??? is there any readily available function for that in php or mysql????? else suggest me some links for verifying email address enetered...
12
by: Joe90 | last post by:
this may seem so lame to some, but I have exausted my brain trying to figure this out, and therefore throw myself at the group: basic breakdown of problem $CurrentSite = $_SERVER; <?php echo...
9
by: news | last post by:
There's all kinds of ways to validate an email address to make sure it's well formed and whatnot, but what about checking to see if it's a valid e-mail account? Like how you can use checkdnsrr()...
3
by: Angelos | last post by:
Hello there I am trying to find the function that returns the ip address for a domain. I try that : echo $domain = checkdnsrr('www.google.com','ANY'); For example... And I get in the screen 1...
0
by: comp.lang.php | last post by:
I wrote a method that should check if an email address is valid. In another method I've already checked to see if $_POST exists and is well-formed, so those checks are not necessary in this scope....
4
by: shalinikonatam | last post by:
Can any one help me? how to verify weather the Email actually exist or not? Thanks in Advance.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.