Jump to content

URL Strip Function


brown2005

Recommended Posts

Hi,

I want to be able to take a URL and strip it so it only comes out with say domain.co.uk.

I want the function to be able to combat the following things....

1) if it has a http:// or https:// at the front or any other alternative
2) if it has www. at front or any other alternative
3) if they just put domain.co.uk it just returns domain.co.uk

Thanks
Link to comment
Share on other sites

If you checked your old thread there is a reply there will work. Check the last  [url=http://www.phpfreaks.com/forums/index.php/topic,107070.msg429328.html#msg429328]reply[/url] in your old thread. The code provided does what you wnat to do.

[url=http://www.phpfreaks.com/forums/index.php/topic,107070.0.html]Link to old thread[/url]

Do not double post the same problems, even if you didnt make it clear the first time. Edit the first post in the thread, or reply to your thread with a better explanation of what you are trying to do.

Thread closed
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.