{"id":28756740,"url":"https://github.com/magefan/module-geoip","last_synced_at":"2025-06-17T03:08:44.751Z","repository":{"id":37405961,"uuid":"118587635","full_name":"magefan/module-geoip","owner":"magefan","description":"Detect Country by IP in Magento 2","archived":false,"fork":false,"pushed_at":"2025-05-08T12:29:25.000Z","size":35615,"stargazers_count":53,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T12:49:49.677Z","etag":null,"topics":["magefan","magefan-extension","magento","magento-2","magento-2-extension","magento-2-module","magento-2extension-free","magento-extension","magento-extension-free","magento-module","magento-module-free","magento-plugin","magento2","magento2-extension","magento2-extension-free","magento2-free-extension","magento2-module","magento2-module-free","magento2-plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"osl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magefan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2018-01-23T09:25:40.000Z","updated_at":"2025-05-08T12:29:05.000Z","dependencies_parsed_at":"2024-05-03T09:44:41.970Z","dependency_job_id":"ae66ea24-2eee-4f74-8fc8-71411fafdf8f","html_url":"https://github.com/magefan/module-geoip","commit_stats":{"total_commits":114,"total_committers":9,"mean_commits":"12.666666666666666","dds":"0.22807017543859653","last_synced_commit":"4a921c3c84016086c0f46b024af10827aa5ff8de"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/magefan/module-geoip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magefan%2Fmodule-geoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magefan%2Fmodule-geoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magefan%2Fmodule-geoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magefan%2Fmodule-geoip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magefan","download_url":"https://codeload.github.com/magefan/module-geoip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magefan%2Fmodule-geoip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260281527,"owners_count":22985630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["magefan","magefan-extension","magento","magento-2","magento-2-extension","magento-2-module","magento-2extension-free","magento-extension","magento-extension-free","magento-module","magento-module-free","magento-plugin","magento2","magento2-extension","magento2-extension-free","magento2-free-extension","magento2-module","magento2-module-free","magento2-plugin"],"created_at":"2025-06-17T03:08:44.189Z","updated_at":"2025-06-17T03:08:44.734Z","avatar_url":"https://github.com/magefan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magento 2 GeoIP Database Extension by Magefan\n\n[![Total Downloads](https://poser.pugx.org/magefan/module-geoip/downloads)](https://packagist.org/packages/magefan/module-geoip)\n[![Latest Stable Version](https://poser.pugx.org/magefan/module-geoip/v/stable)](https://packagist.org/packages/magefan/module-geoip)\n\n\u003cimg  align=\"right\" width=\"120\" height=\"70\" src=\"https://magefan.com/media/wysiwyg/made_in_ukraine.jpg\"\u003e\n\nThis Magento 2 GeoIP module provides you PHP methods for getting customer country by IP, without any additional plugin for PHP.\n\nIt is used for [Magento 2 Currency Auto Switcher](https://magefan.com/magento-2-currency-switcher-auto-currency-by-country) and [Magento 2 Auto Language Switcher](https://magefan.com/magento-2-auto-language-switcher) by Magefan\n\n## 🇺🇦 Stand with Ukraine! [How can you help?](https://magefan.com/blog/join-our-donations)\n\n## Requirements\n  * Magento Community Edition 2.0.x-2.4.x or Magento Enterprise Edition 2.0.x-2.4.x\n\n## Installation Method 1 - Installing via composer\n  * Open command line\n  * Using command \"cd\" navigate to your magento2 root directory\n  * Run command: composer require magefan/module-geoip\n```\ncomposer require magefan/module-geoip\nphp bin/magento setup:upgrade\nphp bin/magento setup:di:compile\nphp bin/magento setup:static-content:deploy\n```\n\n\n## Installation Method 2 - Installing using archive\n  * Install GeoIP2 PHP API (https://github.com/maxmind/GeoIP2-php).\n  * Download [ZIP Archive](https://github.com/magefan/module-geoip/archive/master.zip)\n  * Extract files\n  * In your Magento 2 root directory create folder app/code/Magefan/GeoIp\n  * Copy files and folders from archive to that folder\n  * In command line, using \"cd\", navigate to your Magento 2 root directory\n  * Run commands:\n```\nphp bin/magento setup:upgrade\nphp bin/magento setup:di:compile\nphp bin/magento setup:static-content:deploy\n```\n\n## How To Use\n```\nprotected $ipToCountryRepository;\n\npublic function __construct(\n    \\Magefan\\GeoIp\\Model\\IpToCountryRepository $ipToCountryRepository,\n    ....//other code\n) {\n    $this-\u003eipToCountryRepository = $ipToCountryRepository;\n    ...//other code\n}\n\npublic function example() {\n    $visitorCountyCode = $this-\u003eipToCountryRepository-\u003egetVisitorCountryCode();\n    $someCountryCodeByIp = $this-\u003eipToCountryRepository-\u003egetCountryCode('104.27.164.57');\n    ...//other code\n}\n```\n\n## Support\nIf you have any issues, please [contact us](mailto:support@magefan.com)\nthen if you still need help, open a bug report in GitHub's\n[issue tracker](https://github.com/magefan/module-geoip/issues).\n\n## Need More Features?\nPlease contact us to get a quote\nhttps://magefan.com/contact\n\n## License\nThe code is licensed under [Open Software License (\"OSL\") v. 3.0](http://opensource.org/licenses/osl-3.0.php).\n\nThis product includes GeoLite2 data created by MaxMind, available from\n\u003ca href=\"https://www.maxmind.com\"\u003ehttps://www.maxmind.com\u003c/a\u003e.\n\n## Originally use these databases:\nhttps://www.maxmind.com\n\nhttp://software77.net/geo-ip/\n\n## [Magento 2 Extensions](https://magefan.com/magento-2-extensions) by Magefan\n\n### [Magento 2 Google Extensions](https://magefan.com/magento-2-extensions/google-extensions)\n\n  * [Magento 2 Google Indexing](https://magefan.com/magento-2-google-indexing-api)\n  * [Magento 2 Google Analytics 4](https://magefan.com/magento-2-google-analytics-4)\n  * [Magento 2 Google Tag Manager](https://magefan.com/magento-2-google-tag-manager)\n  * [Magento 2 Google Shopping Feed](https://magefan.com/magento-2-google-shopping-feed-extension)\n  * [Magento 2 Google Customer Reviews](https://magefan.com/magento-2-google-customer-reviews)\n\n### Magento 2 SEO Extensions\n\n  * [Magento 2 SEO Extension](https://magefan.com/magento-2-seo-extension)\n  * [Magento 2 Rich Snippets](https://magefan.com/magento-2-rich-snippets)\n  * [Magento 2 HTML Sitemap](https://magefan.com/magento-2-html-sitemap-extension)\n  * [Magento 2 XML Sitemap](https://magefan.com/magento-2-xml-sitemap-extension)\n  * [Magento 2 Facebook Open Graph](https://magefan.com/magento-2-open-graph-extension-og-tags)\n  * [Magento 2 Twitter Cards](https://magefan.com/magento-2-twitter-cards-extension)\n\n\n### [Magento 2 Speed Optimization Extensions](https://magefan.com/magento-2-extensions/speed-optimization)\n\n  * [Magento 2 Google Page Speed Optimizer](https://magefan.com/magento-2-google-page-speed-optimizer)\n  * [Magento 2 Full Page Cache Warmer](https://magefan.com/magento-2-full-page-cache-warmer)\n  * [Magento 2 Image Lazy Load](https://magefan.com/magento-2-image-lazy-load-extension)\n  * [Magento 2 WebP Images](https://magefan.com/magento-2-webp-optimized-images)\n  * [Magento 2 Rocket JavaScript](https://magefan.com/rocket-javascript-deferred-javascript)\n\n  ### [Magento 2 Admin Panel Extensions](https://magefan.com/magento-2-extensions/admin-extensions)\n\n  * [Magento 2 Size Chart Extension](https://magefan.com/magento-2-size-chart)\n  * [Magento 2 Security Extension](https://magefan.com/magento-2-security-extension)\n  * [Magento 2 Admin Action Log](https://magefan.com/magento-2-admin-action-log)\n  * [Magento 2 Order Editor](https://magefan.com/magento-2-edit-order-extension)\n  * [Magento 2 Better Order Grid](https://magefan.com/magento-2-better-order-grid-extension)\n  * [Magento 2 Extended Product Grid](https://magefan.com/magento-2-product-grid-inline-editor)\n  * [Magento 2 Product Tabs](https://magefan.com/magento-2/extensions/product-tabs)\n  * [Magento 2 Facebook Pixel](https://magefan.com/magento-2-facebook-pixel-extension)\n  * [Magento 2 Email Attachments](https://magefan.com/magento-2-email-attachments)\n  * [Magento 2 Admin View](https://magefan.com/magento-2-admin-view-extension)\n  * [Magento 2 Admin Email Notifications](https://magefan.com/magento-2-admin-email-notifications)\n  * [Magento 2 Login As Customer](https://magefan.com/login-as-customer-magento-2-extension)\n\n### Magento 2 Blog Extensions\n\n  * [Magento 2 Blog](https://magefan.com/magento2-blog-extension)\n  * [Magento 2 Multi Blog](https://magefan.com/magento-2-multi-blog-extension)\n  * [Magento 2 Product Widget](https://magefan.com/magento-2-product-widget)\n\n### [Magento 2 Marketing Automation Extensions](https://magefan.com/magento-2-extensions/marketing-automation)\n\n  * [Magento 2 Cookie Consent](https://magefan.com/magento-2-cookie-consent)\n  * [Magento 2 Product Labels](https://magefan.com/magento-2-product-labels)\n  * [Magento 2 Base Price](https://magefan.com/magento-2-base-price)\n  * [Magento 2 Dynamic Categories](https://magefan.com/magento-2-dynamic-categories)\n  * [Magento 2 Dynamic Blocks and Pages Extension](https://magefan.com/magento-2-cms-display-rules-extension)\n  * [Magento 2 Automatic Related Products](https://magefan.com/magento-2-automatic-related-products)\n  * [Magento 2 Price History](https://magefan.com/magento-2-price-history)\n  * [Magento 2 Mautic Integration](https://magefan.com/magento-2-mautic-extension)\n  * [Magento 2 YouTube Video](https://magefan.com/magento2-youtube-extension)    \n \n### [Magento 2 Cart Extensions](https://magefan.com/magento-2-extensions/cart-extensions)\n\n  * [Magento 2 Checkout Extension](https://magefan.com/better-magento-2-checkout-extension)\n  * [Magento 2 Coupon Code](https://magefan.com/magento-2-coupon-code-link)\n  * [Magento 2 Guest to Customer](https://magefan.com/magento2-convert-guest-to-customer)\n\n### [Magento 2 Multi-Language Extensions](https://magefan.com/magento-2-extensions/multi-language-extensions)\n\n  * [Magento 2 Hreflang Tags](https://magefan.com/magento2-alternate-hreflang-extension)\n  * [Magento 2 Auto Currency Switcher](https://magefan.com/magento-2-currency-switcher-auto-currency-by-country)\n  * [Magento 2 Auto Language Switcher](https://magefan.com/magento-2-auto-language-switcher)\n  * [Magento 2 GeoIP Store Switcher](https://magefan.com/magento-2-geoip-switcher-extension)\n  * [Magento 2 Translation](https://magefan.com/magento-2-translation-extension)\n\n### [Developers Tools](https://magefan.com/magento-2-extensions/developer-tools)\n\n  * [Magento 2 Zero Downtime Deployment](https://magefan.com/blog/magento-2-zero-downtime-deployment)\n  * [Magento 2 Cron Schedule](https://magefan.com/magento-2-cron-schedule)\n  * [Magento 2 CLI Extension](https://magefan.com/magento2-cli-extension)\n  * [Magento 2 Conflict Detector](https://magefan.com/magento2-conflict-detector)\n     \n  ## [Shopify Apps](https://magefan.com/shopify/apps) by Magefan\n\n  * [Shopify Login As Customer](https://apps.shopify.com/login-as-customer)\n  * [Shopify Blog](https://apps.shopify.com/magefan-blog)\n  * [Shopify Size Chart](https://magefan.com/shopify/apps/size-chart)\n  * [Shopify Google Indexer](https://magefan.com/shopify/apps/google-indexing)\n  * [Shopify Product Feeds](https://magefan.com/shopify/apps/product-feed)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagefan%2Fmodule-geoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagefan%2Fmodule-geoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagefan%2Fmodule-geoip/lists"}