mryarbles Posted September 16, 2008 Share Posted September 16, 2008 I'm trying to figure out if there is a way to retrieve the entire url including an appended anchor For instance: if you entered the url: http://www.url.com/application/#/page/1/ $_SERVER["REQUEST_URI"] is "/application/". The anchor "#/page/1/" is nowhere to be found. Does php have any way of retrieving that following anchor? Do I have to do this with javascript? Link to comment https://forums.phpfreaks.com/topic/124536-get-url-with-anchor/ Share on other sites More sharing options...
rarebit Posted September 16, 2008 Share Posted September 16, 2008 I'm not finding anything, but if your generating the links with the anchors, then you can add a GET statement, e.g. ?anc=3 Link to comment https://forums.phpfreaks.com/topic/124536-get-url-with-anchor/#findComment-643136 Share on other sites More sharing options...
DarkWater Posted September 16, 2008 Share Posted September 16, 2008 It is not possible to retrieve the hash of a URL directly using PHP. Link to comment https://forums.phpfreaks.com/topic/124536-get-url-with-anchor/#findComment-643139 Share on other sites More sharing options...
mryarbles Posted September 16, 2008 Author Share Posted September 16, 2008 Son of a Thanks Is it possible with any other server side languages that you know of? Link to comment https://forums.phpfreaks.com/topic/124536-get-url-with-anchor/#findComment-643197 Share on other sites More sharing options...
rarebit Posted September 16, 2008 Share Posted September 16, 2008 might be able to use mod_rewrite to also make it into a variable Link to comment https://forums.phpfreaks.com/topic/124536-get-url-with-anchor/#findComment-643215 Share on other sites More sharing options...
mryarbles Posted September 16, 2008 Author Share Posted September 16, 2008 Yeah that's what I was thinking....but I'm terrible with regular expressions Thanks a lot Link to comment https://forums.phpfreaks.com/topic/124536-get-url-with-anchor/#findComment-643237 Share on other sites More sharing options...
CroNiX Posted September 16, 2008 Share Posted September 16, 2008 Son of a Thanks Is it possible with any other server side languages that you know of? javascript... its not serverside, but you can pass it to a php variable and use it that way. Link to comment https://forums.phpfreaks.com/topic/124536-get-url-with-anchor/#findComment-643396 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.