tronovav / geoip2-update Goto Github PK
View Code? Open in Web Editor NEWUpdate Maxmind.com GeoIP2/GeoLite2 databases from your php script, application or via Composer.
License: MIT License
Update Maxmind.com GeoIP2/GeoLite2 databases from your php script, application or via Composer.
License: MIT License
Kindly consider adding GeoIP2-ISP support : )
I added locally the following in $remoteEditions
and it works just fine:
'GeoIP2-ISP' => self::TYPE_MMDB,
Thanks : )
Describe the bug
Updates never got pushed to packagist. Thank you for the package :)
I was just wondering if updating the CSV database is supported in any way?
When using the "Use GeoIP.conf file:" to update databases via composer, the process fails every time with the following error:
The "geoipConfFile" parameter does not exist. Just remove it from the options. See https://github.com/tronovav/geoip2-update
Steps to reproduce the behavior:
Environment:
tronovav/geoip2-update
version: v2.1.16Additional context
The issue appears to be a result of the Client.php constructor checking if each parameter exists as a property in the Client class.
if ($thisClass->hasProperty($key) && $thisClass->getProperty($key)->isPublic())
geoipConfFile is not a property in the Client.php file so this fails every time. I solved the problem by simply declaring the missing propery as public $geoipConfFile;
in the Client.php file.
The licence key is required in the composer.json
. This is not so good, because I cannot push this file to my public repository then.
Do you have a recommended work-around?
Currently, the script deletes the directory and then extracts the new directory. If this was done while the application was running, it could lead to errors in the window of time between the deletion and when the files are fully extracted.
The official geoipupdate
client avoids this issue by atomically replacing the file. It does this by extracting the new file to a temp file on the file system and then moving the new file over the old file. On unix systems, a move of a file on the file system is an atomic operation.
This is complicated a bit by the fact that this library is operating on directories rather than individual files as you cannot move a directory over another directory. If the library only handled MMDB files, I would recommend just operating on those individual files. However, the CSV files present a somewhat more difficult case as you want to replace them all at once. This could be accomplished by using a symlink to the actual directory and atomically replacing that.
This article covers this at a bit more depth. I only glanced at it, but the information seems correct.
Describe the bug
hi, im using this package to download updated free databases
I follow all steps but i receive this message : Edition ID: "GeoLite2-Country" not found in maxmind.com.
This message is in Client.php # 160.
To Reproduce
This is what i done:
Desktop (please complete the following information):
Additional context
I tried to call generated url from Client.php in headers method link #226.
https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&suffix=tar.gz&license_key=mylicense
This works.
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.