Posted by Comedywood on 11/29/05 08:56
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]
|