Posted by Ray Paseur on 09/26/54 11:33
Good point: I recently counted HTTP_REFERER and found it was missing about
1 ~ 2 % of the time, even on valid referrals from inside my pages. Any idea
why this happens?
And thanks for the workaround. ~Ray
"Comedywood" <boris@comedywood.comedy> wrote in message
news:04Tif.3722$wf2.364523@news20.bellglobal.com...
> http_referer is not always available --- hope this helps:
>
> $locateduri = $_SERVER['SCRIPT_URI'];
> if (preg_match("/\https\b/i", $locateduri))
> {
> // SECURE - HTTPS
> }
> else
> {
> // not secure - http
> }
>
>
>
> "Ray Paseur" <ray@earplugsnon-aol.com> wrote in message
> news:o9jhf.20769$rB3.7810@dukeread02...
>> <snip> verify that the site sending the data is using SSL(https). Is
>> there any way of validating that in PHP? </snip>
>>
>> You might check the referer field $_SERVER['HTTP_REFERER']
>> It will be blank if there is no referer link, and so it won't always show
>> up in phpinfo. Try these two scripts and see if that helps:
>>
>> <?php // phprefer.php
>> echo "<a href=phpinfo.php>phpinfo</a>
>> ?>
>>
>> <?php // phpinfo.php
>> phpinfo();
>> ?>
>>
>>
>
>
[Back to original message]
|