I have a form which allows a user to enter a URL and then stores that information in a SQL db.
When I get the URL I want to strip the protocol info and the path info. For example, if a user inputs "http://www.google.com/page1/index.php" I want to strip it down to "google.com".
Likewise if a user enters "www.google.com" I would like to strip the www.
Can any one point me in the right direction please?