I'm just wondering and it might be stupid but... I'm gonna risk: what about using `stripos` just in case somehow `HTTP://` will be in the url or even before all these `strpos` calls use `strtolower()` on `$url`?