How can I check if 'http://' is in the variable, and if not, add it?
<p>Basically, I'm using <code>gethostbyname()</code> to get the IP address of the specified URL, using <code>parse_url()</code> to determine the specific domain. However, this doesn't work if <code>http://</code> is not in the URL (unless I'm missing an option)</p>

<p>So how can I check if <code>http://</code> is in the URL, and if not, add it appropriately?</p>

<p>Or if have a better alternative, I'd like to hear it. Thanks.</p>
