Strip URL to domain name

/ Published in: PHP
Save to your folder(s)

Alternative to
[](, "this snippet"), as it didn't come out clearly in the comments.

Update - Edited based on gdvickery's comment - thanks!

Also added a test case so people can see how it works.

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.