Pencarian Spesifik Dengan Google Download YouTube Tanpa Downloader
Feb 08 24

As a supplement of WordPress IP to Country Plugin created by Priyadi Iman Nurcahyo, I created a very simple WordPress plugin named IPCT Plugin. This plugin detects the city name of the visitors based on their IP number. I use the GeoLiteCity database to translate IP number into the city name.

Requirement

  1. WordPress 2.0 or newer
  2. Basic knowledge of PHP

Installation

  1. Download the latest GeoLiteCity binary format.
  2. Unzip the file to get GeoLiteCity.dat
  3. Download GeoIP PHP API Module. You need to download geoip.inc, geoipcity.inc, and geoipregionvars.php.
  4. Rename geoip.inc into geoip.inc.php.
  5. Rename geoipcity.inc into geoipcity.inc.php.
  6. Open geoipcity.inc.php and change the line “require_once ‘geoip.inc’;” into “require_once ‘geoip.inc.php’;”
  7. Download ipct.txt and rename it into ipct.php.
  8. Create new directory named ipct inside your wp-content/plugins directory.
  9. Upload geoip.inc.php, geoipcity.inc.php, geoipregionvars.php, ipct.php, and GeoLiteCity.dat into your wp-content/plugins/ipct directory.
  10. Activate the plugin from your Wordpress plugin menu.

Usage

  1. Open your theme comments.php file with a text editor.
  2. Use the function yahya_print_city($comment->comment_author_IP) inside the comment loop.

That’s all.

If you want to see the result, just put a comment here :)

7 Responses to “WordPress IPCT Plugin”