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 Quote 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)(). Quote 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... Quote 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 :-) Quote Link to comment https://forums.phpfreaks.com/topic/52409-_serverhttp_referer-question/#findComment-258624 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.