Forum Moderators: coopster
A problem...I have content which users retrieve from my server using readfile("http://www.mysite/myfile.txt"). Now I want to log the referer to gather stats on who's calling it.
I've done a RewriteRule to pass the .txt call above through a php script which passes back the data. Works fine. I was hoping in the PHP I could reference $_SERVER['HTTP_REFERER'] to log the calls, but I can't...it doesn't seem to capture it. As an aside, I can get the HOST of the refering site, but that's not much good if it's on a shared server.
I tried another method - instead of readfile() using include_once() - worked as far as getting the content over, but same problem - unable to track the referer.
Is there a way?
I don't want to pass it over manually as obviously users could manipulate it.
Many thanks in anticipation.
Ian
[edited by: Simsi at 11:27 pm (utc) on May 26, 2008]