Results 1 to 2 of 2
May 1, 2007, 02:00 #1
- Join Date
- Mar 2006
- 0 Post(s)
- 0 Thread(s)
How to extract hostname from url.
Hello, want to extract the domain from the referer url so it if is:
I want to get just:
I haven't a clue how to do it. Thanks.
May 1, 2007, 02:03 #2PHP Code:
print $_SERVER['HTTP_HOST']; // www.domain.com
http://www.php.net/manual/en/function.parse-url.phpLogic without the fatal effects.
All code snippets are licensed under WTFPL.