osTicket: Restricting access by country

Daca folositi osTicket si doriti, din motive de siguranta, sa fie disponibil pentru o singura tara, Romania sa zicem, adaugati in main.inc.php urmatorul cod:

$geo = unserialize(file_get_contents(‘http://www.geoplugin.net/php.gp?ip=’ . $_SERVER[‘REMOTE_ADDR’]));
if($geo[‘geoplugin_countryCode’] != ‘RO’)
{
die(‘Zona Restrictionata’);
}

Adaugă un răspuns

Your email address will not be published. Required fields are marked *