protected function getAvailableDatabases()
{
$databases = geoip_db_get_all_info();
foreach ($databases as $db) {
if (stripos($db['description'], 'ASNum') !== false && $db['available']) {
$this->databases['asnum'] = true;
}
if (stripos($db['description'], 'City') !== false && $db['available']) {
$this->databases['city'] = true;
}
if (stripos($db['description'], 'Country') !== false && $db['available']) {
$this->databases['country'] = true;
}
if (stripos($db['description'], 'Country V6') !== false && $db['available']) {
$this->databases['countryv6'] = true;
}
if (stripos($db['description'], 'Domain Name') !== false && $db['available']) {
$this->databases['domainname'] = true;
}
if (stripos($db['description'], 'ISP') !== false && $db['available']) {
$this->databases['isp'] = true;
}
if (stripos($db['description'], 'Netspeed') !== false && $db['available']) {
$this->databases['netspeed'] = true;
}
if (stripos($db['description'], 'Organization') !== false && $db['available']) {
$this->databases['org'] = true;
}
if (stripos($db['description'], 'Proxy') !== false && $db['available']) {
$this->databases['proxy'] = true;
}
if (stripos($db['description'], 'Region') !== false && $db['available']) {
$this->databases['region'] = true;
}
}
}