You are here: Re: Referer site is https or not « PHP SQL « IT news, forums, messages
Re: Referer site is https or not

Posted by usenet on 11/28/05 18:59

On Tue, 22 Nov 2005 09:43:33 -0500, JDS <jeffrey@example.invalid> wrote:

>On Tue, 22 Nov 2005 08:12:11 +0000, Neeper wrote:
>
>> well. How do I verify this?
>
>look at $_SERVER

Expanding on jeffrey's reply, this will force a page from http:// to https:// in
PHP. Of course, it must be sent before any output to the browser.

<?php
if (!isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) != 'on') {
header ('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
exit();
}
?>

HTH

 

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

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