So lets say i have this url:
$url = $_POST;
I would like to remove the http://, the www. and the last "/". The trick is that the $url can be witten like this: $url = 'http://site.com/' like this: $url = 'www.site.com/' or even like this: $url = 'site.com/'. And so on and so forth making different combination with http:// www. and the /.
I have no idea how to remove all 3 of them if they all exist or just 1 of the if the other 2 don't exist!? Can anyone please help me with this!?