Hello, want to extract the domain from the referer url so it if is:
http://www.domain.com/somepage.html
I want to get just:
domain.com
I haven't a clue how to do it. Thanks.
| SitePoint Sponsor |
Hello, want to extract the domain from the referer url so it if is:
http://www.domain.com/somepage.html
I want to get just:
domain.com
I haven't a clue how to do it. Thanks.
orPHP Code:print $_SERVER['HTTP_HOST']; // www.domain.com
http://www.php.net/manual/en/function.parse-url.php
Bookmarks