Gazelle/sections/tools/services/get_cc.php

19 lines
409 B
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
2013-05-02 08:00:23 +00:00
if (isset($_SERVER['http_if_modified_since'])) {
header('Status: 304 Not Modified');
2011-03-28 14:21:28 +00:00
die();
}
2013-05-02 08:00:23 +00:00
header('Expires: '.date('D, d-M-Y H:i:s \U\T\C', time() + 3600 * 24 * 120)); //120 days
header('Last-Modified: '.date('D, d-M-Y H:i:s \U\T\C', time()));
2011-03-28 14:21:28 +00:00
2013-08-28 23:08:41 +00:00
if (!check_perms('users_view_ips')) {
2013-05-02 08:00:23 +00:00
die('Access denied.');
}
2011-03-28 14:21:28 +00:00
if (empty($_GET['ip'])) {
2013-05-02 08:00:23 +00:00
die('Invalid IP address.');
2011-03-28 14:21:28 +00:00
}
2012-10-11 08:00:15 +00:00
die(Tools::geoip($_GET['ip']));