truegilly Posted August 6, 2007 Share Posted August 6, 2007 Hi, im trying to retrieve the entire URL using php and so far not had much luck, i have tried using <?php echo $_SERVER['REQUEST_URI'];?> which will return everything after http://localhost:6789. here is the entire URL... http://localhost:6789/p03272434/emudom/register.php?UName=seen using <?php echo $_SERVER['REQUEST_URI'];?> returns..... p03272434/emudom/register.php?UName=seen can anyone help ?? ??? thanks Truegilly Quote Link to comment https://forums.phpfreaks.com/topic/63595-solved-returning-the-whole-url-with-php/ Share on other sites More sharing options...
LiamProductions Posted August 6, 2007 Share Posted August 6, 2007 <?php echo $_SERVER['REQUEST_URL']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/63595-solved-returning-the-whole-url-with-php/#findComment-316901 Share on other sites More sharing options...
truegilly Posted August 6, 2007 Author Share Posted August 6, 2007 thanks for that but there docent seem to be a $_SERVER['REQUEST_URL'] available, tried it and it said .... Notice: Undefined index: REQUEST_URL in C:\p3t\public_php\emudom\register.php on line 198 Quote Link to comment https://forums.phpfreaks.com/topic/63595-solved-returning-the-whole-url-with-php/#findComment-316906 Share on other sites More sharing options...
hasanatkazmi Posted August 6, 2007 Share Posted August 6, 2007 echo $_SERVER['HTTP_REFERER']; will return full URL for the page u have come from Quote Link to comment https://forums.phpfreaks.com/topic/63595-solved-returning-the-whole-url-with-php/#findComment-316946 Share on other sites More sharing options...
mohaakilla51 Posted August 6, 2007 Share Posted August 6, 2007 “http://”.$_SERVER[’HTTP_HOST’].$_SERVER[’PATH_INFO’] Quote Link to comment https://forums.phpfreaks.com/topic/63595-solved-returning-the-whole-url-with-php/#findComment-316976 Share on other sites More sharing options...
truegilly Posted August 8, 2007 Author Share Posted August 8, 2007 awsome, ill give that a try !! truegilly Quote Link to comment https://forums.phpfreaks.com/topic/63595-solved-returning-the-whole-url-with-php/#findComment-318319 Share on other sites More sharing options...
navjak Posted August 8, 2007 Share Posted August 8, 2007 Try echo "http://" .$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; Quote Link to comment https://forums.phpfreaks.com/topic/63595-solved-returning-the-whole-url-with-php/#findComment-318329 Share on other sites More sharing options...
truegilly Posted August 9, 2007 Author Share Posted August 9, 2007 great thanks !! Quote Link to comment https://forums.phpfreaks.com/topic/63595-solved-returning-the-whole-url-with-php/#findComment-319373 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.