Support

Admin Tools

#11633 Country database

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Wednesday, 21 March 2012 15:32 CDT

purplechris
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: (2.5.3)
PHP version: (5.2.17)
MySQL version: (5.0.92-community )
Host: ()
Admin Tools version: (latest)

Is it possible to update the geo database via a cron or something once per month.

or even better if i have a licence for there api is this possible?

nicholas
Akeeba Staff
Manager
In theory it's possible, just not through Admin Tools. They have a specific URL for their country database file, so I guess all it takes is writing a small shell script to download, extract and move the file into Admin Tools' assets directory.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

purplechris
thats cool i can do that easy enough.

the other thing is the possability to check that api for the ip which is a paid service which i do pay for that would be cool but that obviously would need building in to your component

nicholas
Akeeba Staff
Manager
Yeah, that would be more complicated. Right now it's just not possible. I will think about adding that as a feature though!

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

purplechris
sounds good, i will post my php script here once ive done it so auto update will then be possible with a cron might help you and other users in the future

nicholas
Akeeba Staff
Manager
Good idea! If you agree, I'll put it in the documentation, too.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

purplechris
sounds good will be ready shortly after ive tested it.

purplechris
Sorted few guidelines.

If you request it more than once per 30 mins they block your ip for 3 hours so ive put in a test url where can put there file someone on your server to text and then a live link when you are ready.

You can put in the assets directory and allow in your htaccess maker, name the file something random. Or put in any directory and alter the path to the file, personally prefer the later its easier.

// Where you want to save the file to, currently defaulted to the directory of this script
$dir = dirname(__FILE__);

$zipfile = 'http://www.domain.com/GeoIP.dat.gz';
// LIVE LINK $zipfile = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz';
file_put_contents('geoip.gz', file_get_contents($zipfile));

$sfp = gzopen('geoip.gz', 'rb');
$fp = fopen('GeoIP.dat', 'w');
while ($string = gzread($sfp, 4096)) {
fwrite($fp, $string, strlen($string));
}
gzclose($sfp);
fclose($fp);

if (is_file('geoip.gz')) {
unlink('geoip.gz');
}
?>

nicholas
Akeeba Staff
Manager
Thank you! I'm adding that to the documentation right now.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

purplechris
Hey my team have just finished plugins for 1.5 and 2.5 to check the live geo database if you have a licence key, it works for admin and front end.

Would you like to distribute or purhaps the code will help for your future development?

nicholas
Akeeba Staff
Manager
I'd rather not. When people see "license key" they think that this feature is either included in their subscription to us or that a subscription to a third party service is required. I'd rather not have to go through this, but thanks for the offer :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!