codrgii Posted June 17, 2011 Share Posted June 17, 2011 Is there a way in php to collect the url request? to be clear i would like to collect the info that is in red below www.mysite.com/collect_this is there a way? Link to comment https://forums.phpfreaks.com/topic/239656-find-server-url/ Share on other sites More sharing options...
requinix Posted June 17, 2011 Share Posted June 17, 2011 With the leading slash, $_SERVER["REQUEST_URI"] That includes the query string. If you don't want that, strtok($_SERVER["REQUEST_URI"], "?") Link to comment https://forums.phpfreaks.com/topic/239656-find-server-url/#findComment-1231129 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.