?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ if (version_compare(phpversion(), '5.2.0', '<')===true) { echo '

Whoops, it looks like you have an invalid PHP version.

Magento supports PHP 5.2.0 or newer. Find out how to install Magento using PHP-CGI as a work-around.

'; exit; } /** * Error reporting */ error_reporting(E_ALL | E_STRICT); /** * Compilation includes configuration file */ define('MAGENTO_ROOT', getcwd()); $compilerConfig = MAGENTO_ROOT . '/includes/config.php'; if (file_exists($compilerConfig)) { include $compilerConfig; } $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; $maintenanceFile = 'maintenance.flag'; if (!file_exists($mageFilename)) { if (is_dir('downloader')) { header("Location: downloader"); } else { echo $mageFilename." was not found"; } exit; } if (file_exists($maintenanceFile)) { include_once dirname(__FILE__) . '/errors/503.php'; exit; } require_once $mageFilename; #Varien_Profiler::enable(); if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) { Mage::setIsDeveloperMode(true); } ini_set('display_errors', 1); ini_set('max_execution_time', 1800); $website_root_path = $_SERVER['DOCUMENT_ROOT'].'/geoip_plugin/'; require($website_root_path . 'getcountry.php'); umask(0); if (!empty($_SERVER['HTTP_CLIENT_IP'])) { //check ip from share internet $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from proxy $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } if($ip != '203.192.204.92' && $ip != '116.75.114.15' && $ip != '47.9.136.56' && $ip != '103.38.69.130' && $ip != '47.15.13.253' && $ip != '49.43.24.60' && $ip != '115.96.181.158'){ if($country == 'India') { include_once dirname(__FILE__) . '/errors/503.php'; exit; } } umask(0); /* Store or website code */ $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; /* Run store or run website */ $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; Mage::run($mageRunCode, $mageRunType); ini_set('max_execution_time ', 1800);