nathanmaxsonadil Posted September 27, 2007 Share Posted September 27, 2007 I was wondering how to get everything after the ? in a url? I need to have a file redirect with all it's GET variable's.. Quote Link to comment https://forums.phpfreaks.com/topic/70933-get-varible-redirect/ Share on other sites More sharing options...
pocobueno1388 Posted September 27, 2007 Share Posted September 27, 2007 I think $_SERVER['REQUEST_URI'] Is what your looking for. If not, just put this code on the page and look for the output your looking for, and use that server variable. <?php echo '<pre>'; print_r($_SERVER); echo '</pre>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/70933-get-varible-redirect/#findComment-356582 Share on other sites More sharing options...
nathanmaxsonadil Posted September 27, 2007 Author Share Posted September 27, 2007 that would work but I would want everything after a ? how would I do that? Quote Link to comment https://forums.phpfreaks.com/topic/70933-get-varible-redirect/#findComment-356585 Share on other sites More sharing options...
wildteen88 Posted September 27, 2007 Share Posted September 27, 2007 Use $_SERVER['REQUEST_URI'] instead. This includes everything after the domain name, eg it'll return: foo/bar.php?woo=noo if the url is www.example.com/foo/bar.php?woo=noo Quote Link to comment https://forums.phpfreaks.com/topic/70933-get-varible-redirect/#findComment-356592 Share on other sites More sharing options...
nathanmaxsonadil Posted September 27, 2007 Author Share Posted September 27, 2007 that would work but I would want everything after a ? how would I do that? I did this with an explode Quote Link to comment https://forums.phpfreaks.com/topic/70933-get-varible-redirect/#findComment-356593 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.