{"id":50950854,"url":"https://github.com/neto737/geoip2-update","last_synced_at":"2026-06-20T03:01:00.520Z","repository":{"id":364801402,"uuid":"1268435118","full_name":"neto737/geoip2-update","owner":"neto737","description":"MaxMind GeoIP update client code","archived":false,"fork":false,"pushed_at":"2026-06-13T15:14:02.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T16:32:19.897Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neto737.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-13T14:29:27.000Z","updated_at":"2026-06-13T15:09:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/neto737/geoip2-update","commit_stats":null,"previous_names":["neto737/geoip2-update"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/neto737/geoip2-update","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neto737%2Fgeoip2-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neto737%2Fgeoip2-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neto737%2Fgeoip2-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neto737%2Fgeoip2-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neto737","download_url":"https://codeload.github.com/neto737/geoip2-update/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neto737%2Fgeoip2-update/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34471639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-18T01:02:59.525Z","updated_at":"2026-06-19T02:00:32.061Z","avatar_url":"https://github.com/neto737.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeoIP2 Update\n\nUpdate GeoIP2/GeoLite2 databases from your PHP script or automatically via Composer.\n\n## Requirements\n\n- PHP **8.3+**\n- `ext-curl`\n- `ext-zip` *(only required for CSV database editions)*\n- A valid [MaxMind license key](https://support.maxmind.com/account-faq/license-keys/where-do-i-find-my-license-key/)\n\n## Installation\n\n```bash\ncomposer require neto737/geoip2-update\n```\n\n## Usage\n\n### 1. Automatic updates via Composer\n\nAdd the configuration to your project's `composer.json`. The databases will be checked and updated every time `composer update` or `composer update neto737/geoip2-update` runs.\n\n```json\n{\n    \"scripts\": {\n        \"post-update-cmd\": \"neto737\\\\GeoIP2Update\\\\ComposerClient::run\"\n    },\n    \"extra\": {\n        \"neto737\\\\GeoIP2Update\\\\ComposerClient::run\": {\n            \"license_key\": \"YOUR_LICENSE_KEY\",\n            \"dir\": \"@composer/../geoip2\"\n        }\n    }\n}\n```\n\nThe `@composer` token is replaced with the directory of your `composer.json` file.\n\n### 2. Programmatic updates from PHP\n\n```php\nuse neto737\\GeoIP2Update\\Client;\n\n$client = new Client([\n    'license_key' =\u003e 'YOUR_LICENSE_KEY',\n    'dir'         =\u003e '/path/to/geoip2',\n    'editions'    =\u003e ['GeoLite2-ASN', 'GeoLite2-City', 'GeoLite2-Country'],\n]);\n\n$client-\u003erun();\n\nforeach ($client-\u003eupdated() as $message) {\n    echo $message . PHP_EOL;\n}\n\nforeach ($client-\u003eerrors() as $error) {\n    echo 'Error: ' . $error . PHP_EOL;\n}\n```\n\n### 3. Loading the configuration from a GeoIP.conf file\n\n```php\n$client = new Client([\n    'geoipConfFile' =\u003e '/etc/GeoIP.conf',\n    'dir'           =\u003e '/path/to/geoip2',\n]);\n\n$client-\u003erun();\n```\n\nThe `GeoIP.conf` file is the standard MaxMind configuration format:\n\n```\nAccountID  12345\nLicenseKey YOUR_LICENSE_KEY\nEditionIDs GeoLite2-ASN GeoLite2-City GeoLite2-Country\n```\n\n## Configuration options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `license_key` | `string` | Your MaxMind license key |\n| `dir` | `string` | Directory where database files will be stored |\n| `editions` | `string[]` | List of edition IDs to update (see below) |\n| `geoipConfFile` | `string` | Path to a `GeoIP.conf` file (sets `license_key` and `editions`) |\n\n## Supported editions\n\n| Edition ID | Format |\n|------------|--------|\n| `GeoLite2-ASN` | MMDB |\n| `GeoLite2-City` | MMDB |\n| `GeoLite2-Country` | MMDB |\n| `GeoIP2-ASN` | MMDB |\n| `GeoIP2-City` | MMDB |\n| `GeoIP2-Country` | MMDB |\n| `GeoLite2-ASN-CSV` | ZIP |\n| `GeoLite2-City-CSV` | ZIP |\n| `GeoLite2-Country-CSV` | ZIP |\n| `GeoIP2-ASN-CSV` | ZIP |\n| `GeoIP2-City-CSV` | ZIP |\n| `GeoIP2-Country-CSV` | ZIP |\n\nCSV editions require `ext-zip`.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneto737%2Fgeoip2-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneto737%2Fgeoip2-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneto737%2Fgeoip2-update/lists"}