[Cialug] php $_SERVER['HTTP_REFERER'] and https requests
Daniel A. Ramaley
daniel.ramaley at DRAKE.EDU
Tue Aug 14 11:50:20 CDT 2007
My guess is that the browser chooses not to send a referrer header when
switching from https to http pages (or perhaps for anything https
related). If the browser fails to send the header, i don't think there
is an easy way to generate it. If the https request was accessing a
page on the same server i suppose you could grep the log for the
client's IP and look for the last thing that is a page (as opposed to
an image), but since browsers have back buttons that wouldn't be
guaranteed accurate.
On Tuesday 14 August 2007 11:30, David Champion wrote:
>Dumb question... I'm checking the $_SERVER['HTTP_REFERER'] in a php
>page, but if the href comes from a https page, the referrer is empty.
>Checked the apache access_log shows a "-" where the referrer would be.
>
>Is there a way to get the referrer or ip address from a https request,
>or am I sunk?
------------------------------------------------------------------------
Dan Ramaley Dial Center 118, Drake University
Network Programmer/Analyst 2407 Carpenter Ave
+1 515 271-4540 Des Moines IA 50311 USA
More information about the Cialug
mailing list