Basically, I'm using gethostbyname()
to get the IP address of the specified URL, using parse_url()
to determine the specific domain. However, this doesn't work if http://
is not in the URL (unless I'm missing an option)
So how can I check if http://
is in the URL, and if not, add it appropriately?
Or if have a better alternative, I'd like to hear it. Thanks.