Junior1618
02-24-2010, 12:22 AM
Hi,
I have a webpage that has URL information passed to it i.e. www.domain.com/?URL=www.test.com/page1/page2/page3.html
What I would like to do is grab the information displayed in the URL string and pass it into the webpage, either in a link or text. Here's the kicker though. I don't want the entire URL to be displayed in the webpage, I only want the root domain i.e. test.com, without http or www. or any subdomains, subpages or ugly query strings.
I've searched high and low for the answer and can't find it anywhere. If someone could spell out the exact code required, i.e. getting the variable to be displayed on the page and making it 'clean', I would be most grateful. My php knowledge is very limited so assume no prior knowledge to be on the safe side.
Thanks in advance for your help.
I have a webpage that has URL information passed to it i.e. www.domain.com/?URL=www.test.com/page1/page2/page3.html
What I would like to do is grab the information displayed in the URL string and pass it into the webpage, either in a link or text. Here's the kicker though. I don't want the entire URL to be displayed in the webpage, I only want the root domain i.e. test.com, without http or www. or any subdomains, subpages or ugly query strings.
I've searched high and low for the answer and can't find it anywhere. If someone could spell out the exact code required, i.e. getting the variable to be displayed on the page and making it 'clean', I would be most grateful. My php knowledge is very limited so assume no prior knowledge to be on the safe side.
Thanks in advance for your help.