programming.name Posted May 17, 2010 Share Posted May 17, 2010 Hi, is there any script to get where users come from? I mean if an user clicked my website link from, say, phpfreaks.com, and the user is now in the site. All I want is to get the previous site, phpfreaks.com. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/202093-getting-where-users-come-from/ Share on other sites More sharing options...
litebearer Posted May 17, 2010 Share Posted May 17, 2010 http://www.plus2net.com/php_tutorial/php_referrer.php Quote Link to comment https://forums.phpfreaks.com/topic/202093-getting-where-users-come-from/#findComment-1059773 Share on other sites More sharing options...
.josh Posted May 18, 2010 Share Posted May 18, 2010 $HTTP_REFERER is deprecated. Use $_SERVER['HTTP_REFERER'], but note that it is set by the agent making the request (like the browser) and is very easily spoofed, so basically it's not really trustworthy unless your site's average user is not inclined to know such things. Quote Link to comment https://forums.phpfreaks.com/topic/202093-getting-where-users-come-from/#findComment-1059856 Share on other sites More sharing options...
ignace Posted May 18, 2010 Share Posted May 18, 2010 $HTTP_REFERER is deprecated. Use $_SERVER['HTTP_REFERER'], but note that it is set by the agent making the request (like the browser) and is very easily spoofed, so basically it's not really trustworthy unless your site's average user is not inclined to know such things. That said, there are a few neat things you can do with it like highlighting keywords if they came from google. Quote Link to comment https://forums.phpfreaks.com/topic/202093-getting-where-users-come-from/#findComment-1059931 Share on other sites More sharing options...
.josh Posted May 18, 2010 Share Posted May 18, 2010 or changing content based on kwds (which btw will hurt your serp ranking if google finds out, unless you can demonstrate you are performing legit a/b or mv tests) Quote Link to comment https://forums.phpfreaks.com/topic/202093-getting-where-users-come-from/#findComment-1060242 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.