bubba1356 Posted April 5, 2008 Share Posted April 5, 2008 Hey guys, I'm building a web stats package in php. I've managed to use javascript to call a php file which sniffs out the browser data and stores it in a MySQL table. The calling script is as follows: <script type="text/javascript" src="addview.php"></script> This is all good, the php file called by this script takes the calling page URL using the referrer header: $Page = getenv('HTTP_REFERER'); Only problem is this: since the referral header changes once the php page loads, I cant find the referral to the page I need (i.e. the referral header BEFORE the php page loads). I was gonna get round this by storing the referrer using javascript in a variable and pass this to the php file??? Anyone have any ideas? Cheers, Bubba Link to comment https://forums.phpfreaks.com/topic/99721-php-and-javascript-referrers/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.