severndigital Posted November 12, 2007 Share Posted November 12, 2007 I know has to be an easy way to do this. I want to pull the entire current url. using $_SERVER['PHP_SELF'] does not seem to work as it only returns the back of the url. I want to get the entire url .. http://www.mywebsite.com/page.php as a variable to parse. I can't find it in the php.net function list. thanks, Chris Link to comment https://forums.phpfreaks.com/topic/77022-solved-pulling-full-current-url/ Share on other sites More sharing options...
wildteen88 Posted November 12, 2007 Share Posted November 12, 2007 You will have to use a combination of different variables. Like so: $full_site_url = 'http://' . $_SERVER['SERVER_NAME'] . '/' . $_SERVER['REQUEST_URI']; echo $full_site_url; Link to comment https://forums.phpfreaks.com/topic/77022-solved-pulling-full-current-url/#findComment-390031 Share on other sites More sharing options...
severndigital Posted November 12, 2007 Author Share Posted November 12, 2007 excellent .. that had what I was looking for ... specifically the $_SESSION['server_name']; call .. thank you, chris Link to comment https://forums.phpfreaks.com/topic/77022-solved-pulling-full-current-url/#findComment-390035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.