Strip URL to its domain name...


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

This is a function i created to basically stip a url down to its domain name and nothing else.
For eg.
If you passed it any of the following urls it would return the same value.
http://www.google.com/
www.google.com
http://www.google.com/search?hl=en&q=jadeyo&btnG=Google+Search&meta=
All of the above urls would return the same varibale of 'google.com'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.