Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP normalize remote url's [duplicate]

Is there any quick function that will convert: HtTp://www.ExAmPle.com/blah to http://www.example.com/blah

Basically I want to lower case the case-insensitive parts of a url.

like image 706
Brian Avatar asked Aug 12 '26 15:08

Brian


1 Answers

No, you'll have to write code for it on your own.

But you can use parse_url() to split the URL into its parts.

like image 65
ThiefMaster Avatar answered Aug 15 '26 05:08

ThiefMaster