You are here: Re: Anyway to check if refer site is using SSL or not???? « All PHP « IT news, forums, messages
Re: Anyway to check if refer site is using SSL or not????

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();
> ?>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация