I have a PHP script that removes the "http://" from user input url strings.
My Script:
$url= "http://techcrunch.com/startups/";
$url = str_replace('http://', '', $url);
Result:
$url= techcrunch.com/startups/
This works great, except that sometimes urls have "https://" instead. Is there a way I can just remove everything before the domain name, no matter what it is?