/ Published in: PHP

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'
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'
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function striptodomain($url) { } } return $url; }
Comments
