DNS to IP how to lookup?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

DNS to IP how to lookup?

Post by alexus »

Hi,
If I have a domain name, how can I convert it to an IP address?
So lets say user eneters yahoo.com and my page would echo 216.109.112.135

Any ideas?
Thanks!
Smackie
Forum Contributor
Posts: 302
Joined: Sat Jan 29, 2005 2:33 pm

Post by Smackie »

Well you could always look in cpanel if you have one and it should say your ip address or you could just click on start > run > type in config > then type ping yourdomainurl.com and it should run and there should be a ip there.. theres many of ways to finding your domain ip address....


Smackie
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

:roll: I didnt mean how to find ip adress in general, i need it for a PHP page to "ping" the domaoin name get an IP address of the server and work with it. No manual job should be done by the user?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Smackie
Forum Contributor
Posts: 302
Joined: Sat Jan 29, 2005 2:33 pm

Post by Smackie »

sorry been a long day..... but im still not sure on what you mean by that right now :S
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

Jcart, thanks!
Thats what i need... now to the next question in another post :)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Smackie wrote:sorry been a long day..... but im still not sure on what you mean by that right now :S
He wants to know the ip address of a domain name using php
Post Reply