domain to hostname php script

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
encoderX
Forum Newbie
Posts: 2
Joined: Sat Dec 20, 2003 5:37 pm
Location: UK
Contact:

domain to hostname php script

Post by encoderX »

Hi
I'm trying to do the following and would be pleased if you can help :D

I have a form where people can put in a domain and I want it to result like:
eg: They enter encoderx.co.uk and the result it shows is uk6-u.valuehost.co.uk
(encoderx being my domain and the uk6-... is the server my site is held).

Hope you can help and thank you :D

encoderX[/url]
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

[php_man]gethostbyaddr[/php_man]() would be a good solution if you ask them to add their site's IP, instead of domain. :wink:
encoderX
Forum Newbie
Posts: 2
Joined: Sat Dec 20, 2003 5:37 pm
Location: UK
Contact:

Post by encoderX »

Hi
Thanks for your reply :D

I've done this already where they can input domain and it results the IP so all they do is x-reference the server list and find their server but I was trying to make it do an ip lookup then a host lookup on the resulting ip. Not doing very well though :( LOL

Does this make sense?
Post Reply