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 Ray Paseur on 10/10/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();
>> ?>
>>
>>
>
>

 

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

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