function ini_isSecureHttp()
{
    if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443') {
        return true;
    } else {
        if (isset($_SERVER['HTTPS']) && ini_isActive($_SERVER['HTTPS'])) {
            return true;
        } else {
            return false;
        }
    }
}
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
if (defined('VISCACHA_CORE') == false) {
    die('Error: Hacking Attempt');
}
include 'classes/class.gpc.php';
$gpc = new GPC();
// Thanks to phpBB for this code
if (ini_isActive(@ini_get('register_globals'))) {
    unset($not_used, $input);
    $not_unset = array('_GET', '_POST', '_COOKIE', '_SERVER', '_SESSION', '_ENV', '_FILES', 'config', 'gpc', 'imagetype_extension', 'var');
    $input = array_merge($_GET, $_POST, $_COOKIE, $_ENV, $_FILES);
    if (isset($_SERVER)) {
        $input = array_merge($input, $_SERVER);
    }
    if (isset($_SESSION) && is_array($_SESSION)) {
        $input = array_merge($input, $_SESSION);
    }
    unset($input['input'], $input['not_unset']);
    while (list($var, ) = @each($input)) {
        if (!in_array($var, $not_unset)) {
            unset(${$var});
            if (isset($GLOBALS[$var])) {
                unset($GLOBALS[$var]);