Extract subdomain and relative address from a url
I encountered a similar requirement, and could not find a ready-made solution for this, so I created a function that is based on the standard PHP function parse_url() and added to this over time to extract everything that I could think of. Below is my code and two examples of the output. This will extract … Read more