realjumper Posted May 21, 2007 Share Posted May 21, 2007 When using (on an Intranet) $_SERVER['HTTP_REFERER']; is it possible to echo just the referring file name rather than the whole url? Thanks, Neil Link to comment https://forums.phpfreaks.com/topic/52409-_serverhttp_referer-question/ Share on other sites More sharing options...
trq Posted May 21, 2007 Share Posted May 21, 2007 parse_url)(). Link to comment https://forums.phpfreaks.com/topic/52409-_serverhttp_referer-question/#findComment-258619 Share on other sites More sharing options...
john010117 Posted May 21, 2007 Share Posted May 21, 2007 First of all, http_referer is NOT reliable (as said in the documentation). You could use str_replace (or parse_url) to strip out the front characters of the url... Link to comment https://forums.phpfreaks.com/topic/52409-_serverhttp_referer-question/#findComment-258620 Share on other sites More sharing options...
realjumper Posted May 21, 2007 Author Share Posted May 21, 2007 Yes, I know it's not reliable in some cases, but for my purposesd it will be fine. I'll have a look at parse_url. Thanks :-) Link to comment https://forums.phpfreaks.com/topic/52409-_serverhttp_referer-question/#findComment-258624 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.