johnathanamber Posted June 7, 2010 Share Posted June 7, 2010 Hello everyone! I was wanting to know if there is some code that can be used to determine the IP address of a given URL. I've only found things that would give me the IP of a visitor to a site or of the current URL, but not for a remote URL. I will be building a small input page with one input field to display the IP address of any URL given... if the user wanted the IP of google.com, then they would get: 74.125.95.99. Thank you very much and God bless, Johnathan Link to comment https://forums.phpfreaks.com/topic/204117-determine-ip-address-of-given-url/ Share on other sites More sharing options...
premiso Posted June 7, 2010 Share Posted June 7, 2010 gethostbyname I believe that function will do what you want. For other ways / more information: http://www.electrictoolbox.com/get-domain-name-ip-address-php/ Link to comment https://forums.phpfreaks.com/topic/204117-determine-ip-address-of-given-url/#findComment-1069082 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.