shadiadiph Posted March 7, 2009 Share Posted March 7, 2009 how can i get the name of the page the user is on or has visited i ahve tried to use $page = getenv("HTTP_REFERER"); print $page; but it doesn't work? Quote Link to comment https://forums.phpfreaks.com/topic/148309-solved-getting-the-name-of-the-page-the-user-is-on/ Share on other sites More sharing options...
a-scripts.com Posted March 7, 2009 Share Posted March 7, 2009 do you mean $_SERVER['PHP_SELF']; ? Quote Link to comment https://forums.phpfreaks.com/topic/148309-solved-getting-the-name-of-the-page-the-user-is-on/#findComment-778632 Share on other sites More sharing options...
shadiadiph Posted March 7, 2009 Author Share Posted March 7, 2009 thanks that seems to work Quote Link to comment https://forums.phpfreaks.com/topic/148309-solved-getting-the-name-of-the-page-the-user-is-on/#findComment-778634 Share on other sites More sharing options...
redarrow Posted March 7, 2009 Share Posted March 7, 2009 There no point what for mate. Are you creating a log, to see where the users went on your web site. Quote Link to comment https://forums.phpfreaks.com/topic/148309-solved-getting-the-name-of-the-page-the-user-is-on/#findComment-778635 Share on other sites More sharing options...
Maq Posted March 7, 2009 Share Posted March 7, 2009 If you want accurate results I wouldn't use $_SERVER['HTTP_REFERER'] it cannot be trusted: From the manual: 'HTTP_REFERER' The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. Quote Link to comment https://forums.phpfreaks.com/topic/148309-solved-getting-the-name-of-the-page-the-user-is-on/#findComment-778643 Share on other sites More sharing options...
shadiadiph Posted March 7, 2009 Author Share Posted March 7, 2009 yes i am creating a log as to which pages have been visited and how many times. I am trying to think of a way to work out where people get bored and leave but it seems like alot of work Quote Link to comment https://forums.phpfreaks.com/topic/148309-solved-getting-the-name-of-the-page-the-user-is-on/#findComment-778663 Share on other sites More sharing options...
chmpdog Posted March 7, 2009 Share Posted March 7, 2009 two words: google analitics im pretty sure they have what you need Quote Link to comment https://forums.phpfreaks.com/topic/148309-solved-getting-the-name-of-the-page-the-user-is-on/#findComment-778666 Share on other sites More sharing options...
shadiadiph Posted March 7, 2009 Author Share Posted March 7, 2009 thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/148309-solved-getting-the-name-of-the-page-the-user-is-on/#findComment-778691 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.