how do i check hosts in php?
<p>I want to match by hostname and I can't figure out how, </p>

<p>example: i want to force all links to be from <code>oi*.tinypic.com</code> or <code>i*.tinypic.com</code>. However people bypass my current validation by using then adding hash at the back of the URL like <code>.jpg#tinypic</code>, if i use <code>stripos()</code> to prevent abuse on the forum.</p>

<p>also, how do i check it's well formed url, of https or http? I'm using <code>parse_url()</code> and doing if <code>(!$var)</code> but it sometimes doesn't work for some reason i don't know</p>
