{"id":36982470,"url":"https://github.com/g4code/geoip","last_synced_at":"2026-01-13T22:52:24.485Z","repository":{"id":23751836,"uuid":"27125986","full_name":"g4code/geoip","owner":"g4code","description":"geoip php library","archived":false,"fork":false,"pushed_at":"2023-11-13T07:58:30.000Z","size":35,"stargazers_count":2,"open_issues_count":1,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-26T21:22:46.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/g4code.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}},"created_at":"2014-11-25T13:00:26.000Z","updated_at":"2023-11-06T10:42:33.000Z","dependencies_parsed_at":"2023-11-13T08:51:18.924Z","dependency_job_id":null,"html_url":"https://github.com/g4code/geoip","commit_stats":{"total_commits":20,"total_committers":5,"mean_commits":4.0,"dds":"0.44999999999999996","last_synced_commit":"232ee3673849a30496ccb5dfca517673c9ff5a08"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/g4code/geoip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Fgeoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Fgeoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Fgeoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Fgeoip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g4code","download_url":"https://codeload.github.com/g4code/geoip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Fgeoip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-01-13T22:52:24.407Z","updated_at":"2026-01-13T22:52:24.466Z","avatar_url":"https://github.com/g4code.png","language":"PHP","readme":"geoip\n======\n\n\u003e geoip - [php](http://php.net) library\n\n## Install\nVia Composer\n\n```sh\ncomposer require g4/geoip\n```\n## Requirements\n\n* PHP GeoIP extension http://php.net/manual/en/geoip.setup.php\n* Maxmind GeoIP database http://dev.maxmind.com/\n* Maxmind GeoIP2-City database\n\n## Installing required packages (CentOS, Redhat)\n\n* yum install GeoIP\n* yum install GeoIP-devel\n* yum install geoipupdate\n* pecl install geoip\n\n## Usage\n\n``` php\n\u003c?php\n\n$geoIp = new \\G4\\GeoIP\\GeoIP('127.0.0.1');\n\n// \"area_code\" -- The PSTN area code (ex: 212)\necho $geoIp-\u003egetAreaCode();\n\n// \"dma_code\" -- Designated Market Area code (USA and Canada only)\necho $geoIp-\u003egetDmaCode();\n\n// \"city\" -- The city\necho $geoIp-\u003egetCity();\n\n// \"continent_code\" -- Two letter continent code\necho $geoIp-\u003egetContinentCode();\n\n// \"country_code\" -- Two letter country code\necho $geoIp-\u003egetCountryCode();\n\n// \"country_code3\" -- Three letter country code\necho $geoIp-\u003egetCountryCode3();\n\n// \"country_name\" -- The country name\necho $geoIp-\u003egetCountryName();\n\n// IP address\necho $geoIp-\u003egetIp();\n\n// \"latitude\" -- The Latitude as signed double\necho $geoIp-\u003egetLatitude();\n\n// \"longitude\" -- The Longitude as signed double\necho $geoIp-\u003egetLongitude();\n\n// \"postal_code\" -- The Postal Code, FSA or Zip Code\necho $geoIp-\u003egetPostalCode();\n\n// \"region\" -- The region code (ex: CA for California)\necho $geoIp-\u003egetRegion();\n\n```\n\n[geoip_record_by_name](http://php.net/manual/en/function.geoip-record-by-name.php)\n\n## Development\n\n### Install dependencies\n\n    $ make install\n\n### Run tests\n\n    $ make test\n\n## License\n\n(The MIT License)\nsee LICENSE file for details...\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4code%2Fgeoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg4code%2Fgeoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4code%2Fgeoip/lists"}