Gazelle/sections/tools/services/get_cc.php
2013-05-02 08:00:23 +00:00

19 lines
452 B
PHP

<?
if (isset($_SERVER['http_if_modified_since'])) {
header('Status: 304 Not Modified');
die();
}
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()));
if (!check_perms('users_view_ips') && !check_perms('tc_advanced_user_search')) {
die('Access denied.');
}
if (empty($_GET['ip'])) {
die('Invalid IP address.');
}
die(Tools::geoip($_GET['ip']));