Jump to content


Photo

URL Strip Function


  • This topic is locked This topic is locked
3 replies to this topic

#1 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 07 September 2006 - 08:03 AM

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

#2 hostfreak

hostfreak
  • Members
  • PipPipPip
  • Advanced Member
  • 581 posts

Posted 07 September 2006 - 08:06 AM

You already started a thread about this, http://www.phpfreaks...c,107070.0.html .

#3 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 07 September 2006 - 08:07 AM

yes i know, but i dont think i explained it properly so i started it again.

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 September 2006 - 11:02 AM

If you checked your old thread there is a reply there will work. Check the last  reply in your old thread. The code provided does what you wnat to do.

Link to old thread

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users