Given "http://google.com/path-to-page" trip to "google.com"
What php and regex would be appropriate?
Use parse_url and get the host part.
host
2.1m questions
2.1m answers
60 comments
57.0k users