[WordPress] 外掛分享: MDL Local Geo Lookup

首頁外掛目錄 › MDL Local Geo Lookup
WordPress 外掛 MDL Local Geo Lookup 的封面圖片
全新外掛
安裝啟用
尚無評分
9 天前
最後更新
問題解決
WordPress 5.8+ PHP 7.4+ v1.0.0 上架:2026-05-31

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「MDL Local Geo Lookup」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

MDL Local Geo Lookup is a lightweight WordPress geolocation plugin that detects visitor location using a local IP geolocation database — no external API calls, no per-request latency, no usage limits.
The plugin automatically downloads and maintains an IP-to-city database on your own server. Every GeoIP lookup runs locally, keeping your site fast and your visitor data private.
No sign-up required. The default DB-IP City Lite source works out of the box — no account, no license key, no configuration. Activate, click one button, done.
Prefer MaxMind?
Switch to GeoLite2 City in Settings by entering a free MaxMind license key.
Why Local Geolocation?
Most IP geolocation plugins call an external API on every page load. That adds latency, creates a single point of failure, and sends your visitor IPs to a third party. MDL Local Geo Lookup keeps everything on your server:

Faster — database lookups in milliseconds, no HTTP round-trip.
More private — visitor IPs never leave your server.
More reliable — no API rate limits, no downtime from third-party services.
Unlimited lookups — no monthly quota, no paid API tiers.

Features:

Two database sources — DB-IP City Lite (default, no account needed) or MaxMind GeoLite2 City (free license key required).
One-click setup — download the geolocation database directly from your admin panel after activation.
Automatic updates — scheduled database refresh keeps IP data current (configurable: 1–30 days).
Shortcode — [mdlgeo_visitor_info] displays visitor country, city, region, postal code, timezone, and coordinates on any page or post.
PHP function — mdlgeo_get_visitor_geo_data() returns full location data for use in themes, plugins, or custom logic.
Visitor location log — optional paginated log of visitor IP addresses and detected locations in the admin panel.
Form builder compatible — embed the shortcode in a hidden field in Elementor Forms, Contact Form 7, WPForms, Gravity Forms, or any HTML form to capture visitor location with submissions.
Cloudflare compatible — automatically reads the real visitor IP from CF-Connecting-IP when Cloudflare is active.
Source alignment tracking — detects when the installed MMDB file does not match the selected database source and prompts you to update it.
GeoIP2 PHP reader bundled — no Composer, no external library downloads.
Secure logging — log directory protected with .htaccess and index.php to block direct web access.

Use Cases:

Display visitor city and country on any page
Pre-fill location fields in contact or lead-capture forms
Personalize content based on visitor country or region
Log visitor locations for analytics or compliance
Feed location data into custom plugins or theme logic

Requirements:

WordPress 5.8 or higher
PHP 7.4 or higher
PHP extensions: zlib, phar
MaxMind license key only required if you select the MaxMind GeoLite2 source

External Services
This plugin connects to third-party services only to download geolocation databases. No visitor data is transmitted to these services.
DB-IP (default)

What: Downloads the free DB-IP City Lite database (.mmdb format), licensed under CC BY 4.0.
When: On first-run setup (triggered by the admin) and on the configured auto-update schedule.
URL: https://download.db-ip.com/free/dbip-city-lite-{year}-{month}.mmdb.gz
Website: https://db-ip.com
Terms of Use: https://db-ip.com/db/lite.php
Privacy Policy: https://db-ip.com/privacy.php

MaxMind GeoLite2 (optional)

What: Downloads the MaxMind GeoLite2 City database (.mmdb format). Only used when the admin selects MaxMind as the database source and provides a license key.
When: On source change or license key update, and on the configured auto-update schedule.
URL: https://download.maxmind.com/app/geoip_download?...
Website: https://www.maxmind.com
Terms of Use: https://www.maxmind.com/en/geolite2/eula
Privacy Policy: https://www.maxmind.com/en/privacy-policy

When using the MaxMind source, this plugin uses the GeoLite2 database created by MaxMind, available from https://www.maxmind.com.
Privacy Policy
Visitor location logging is disabled by default and must be explicitly enabled by the site admin in Settings.
When enabled, each frontend page load by a non-logged-in visitor appends one line to a local log file containing the serial number, timestamp, IP address, country, city, postal code, timezone, and coordinates. All data is stored on your server. No data is transmitted to external services.
Because log entries are associated only with IP addresses — not persistent identifiers such as email addresses — the plugin does not register with WordPress personal data export or erasure tools. You are responsible for disclosing this data collection in your site’s privacy policy in accordance with applicable law (e.g., GDPR, CCPA).

延伸相關外掛

文章
Filter
Mastodon