Skip to content

Instantly share code, notes, and snippets.

@kolyadin
Created April 7, 2015 16:55
Show Gist options
  • Save kolyadin/c0d994ef3913a81cf697 to your computer and use it in GitHub Desktop.
Save kolyadin/c0d994ef3913a81cf697 to your computer and use it in GitHub Desktop.
<?php
if ($_SERVER['REMOTE_ADDR'] != '217.21.220.190'
&& $_SERVER['REMOTE_ADDR'] != '87.117.1.195'
&& $_SERVER['REMOTE_ADDR'] != '46.37.153.91'
&& $_SERVER['REMOTE_ADDR'] != '95.189.168.158'
&& $_SERVER['REMOTE_ADDR'] != '87.117.1.195'
&& $_SERVER['REMOTE_ADDR'] != '95.220.124.35'
&& $_SERVER['REMOTE_ADDR'] != '80.235.94.211'
&& $_SERVER['REMOTE_ADDR'] != '95.27.86.216'
&& $_SERVER['REMOTE_ADDR'] != '195.16.36.98'
&& $_SERVER['REMOTE_ADDR'] != '195.16.36.64'
&& $_SERVER['REMOTE_ADDR'] != '89.207.88.16'
&& $_SERVER['REMOTE_ADDR'] != '89.207.88.5'
&& $_SERVER['REMOTE_ADDR'] != '188.232.160.185'
&& $_SERVER['REMOTE_ADDR'] != '185.36.157.242'
) {
echo file_get_contents('kaska.html');
exit();
}
//echo $_SERVER['REMOTE_ADDR'];
//echo "1";
//return;
use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;
$loader = require_once __DIR__ . '/../app/bootstrap.php.cache';
umask(0000);
// Use APC for autoloading to improve performance.
// Change 'sf2' to a unique prefix in order to prevent cache key conflicts
// with other applications also using APC.
//$loader = new ApcClassLoader('sf2', $loader);
//$loader->register(true);
require_once __DIR__ . '/../app/AppKernel.php';
// if ($_SERVER['REMOTE_ADDR'] == '87.117.1.195') {
// $kernel = new AppKernel('dev', true);
// } else {
$kernel = new AppKernel('prod', false);
// }
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment