Using server better than PHP's $_SERVER['HTTP_REFERER']?
I've been using $_SERVER['HTTP_REFERER'] with PHP for some scripts on my site. It works about 50%-60% of the time.
Someone told me that the "server sees more" about where someone is coming from than $_SERVER['HTTP_REFERER'] can ... then the jerk disappeared without elaborating! ;)
Does anyone know what he's talking about? Is there something I can do with the server to channel facebook traffic to a certain page on my site that will have a higher success rate of recognising traffic from facebook?
PHP get's its $_SERVER from the server. Unless its set up to NOT send the referrer, than apache will provide the HTTP_REFERER to PHP.
Since it works intermittently, I wouldn't be surprised if its simply that 50 - 60% of browsers are not providing their referrer to you. There's nothing to be worried about though; the referrer carries 0 value to it. The most useful purpose of it overall is to help support a session verification method.
BTW, if you are getting links from a particular location, that would indicate you can control the links or get in contact with someone that can. Add a querystring to it to determine where the linkback comes from.
|All times are GMT +1. The time now is 08:12 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.