I'm trying to use php to save the current page URL in a variable, but I can't remember what the code is. Anyone?
We Rock Your Web Forum » Web Programming
How to get domain name with php?
(3 posts)-
Posted 9 months ago #
-
Posted 9 months ago
-
$domain = $_SERVER['HTTP_HOST'];Posted 9 months ago # -
To request only the part after the domain (ie. for example.com/page-name, only "page-name"), use:
$_REQUEST['q']Posted 9 months ago #