473,473 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Get the ip address for a domain

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 ... what I want is to get the IP address for that
DOMAIN ... Any ideas ?
Jul 17 '05 #1
3 1290
In article <d9**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com>,
"Angelos" <an*****@redcatmedia.net> wrote:
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 ... what I want is to get the IP
address for that DOMAIN ... Any ideas ?


gethostbyname()

--
Sandman[.net]
Jul 17 '05 #2
*** Angelos wrote/escribió (Mon, 27 Jun 2005 14:01:58 +0000 (UTC)):
I try that : echo $domain = checkdnsrr('www.google.com','ANY'); For
example...
And I get in the screen 1 ...
Correct. That means that www.google.com does have a DNS entry (in PHP
different from zero means TRUE).
what I want is to get the IP address for that
DOMAIN ... Any ideas ?


"See also dns_get_record(), getmxrr(), gethostbyaddr(), gethostbyname(),
gethostbynamel(), and the named(8) manual page."

gethostbyname(), I reckon.

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #3
> gethostbyname()

THanks man ... !!!
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bobby Ray | last post by:
Hi PHP People, When using mail() with a TO address that includes a subdomain, as in foo@sub.domain.com, the intended recipient never receives the mail. I'm not sure if this is a problem with...
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...
117
by: Steevo | last post by:
Any suggestions as to the best programs for cloaking email addresses? Many thanks -- Steevo
31
by: wallster | last post by:
please keep the flaming to a minimum (a bucket of water is next to me) but I have a question someone here might be able to explain in basic terms for a dunce like me. I helped a friend put...
2
by: ArunPrakash | last post by:
Hi All, I have a case where i need to validate if the email address is valid before i send a mail. for this there are 2 parts.. * check the format of mail address - this is done * check the...
2
by: Code Monkey | last post by:
Hope someone can help me out here. I'm writing some code (web forms) to see where a specific domain name resolves and if its not a local address, redirect to a specific redirect page. ...
11
by: Brian Henry | last post by:
I have a domain cluster with AD running, and I want to lookup a users email address (exchange 2000 server is integrated with the AD system) so i can email the user based on their user name. does...
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....
1
by: Todd Brewer | last post by:
I have an ASP.NET 2.0 site that stores a cookie on the browser. Instead of the domain name (www.somename.com) it comes accross as the IP address of the server. This works in Firefox, but fails...
1
by: chewster | last post by:
Hi. I'm very new to the .htaccess and currently trying to figure this out. I'd like to redirect a parked domain to a sub domain or a folder without showing the actual address location. So far I'm...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.