Title: Quick Flag
Author: Marko-M
Published: <strong>2012年3月6日</strong>
Last modified: 2019年8月2日

---

プラグインを検索

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://s.w.org/plugins/geopattern-icon/quick-flag.svg)

# Quick Flag

 作者: [Marko-M](https://profiles.wordpress.org/marko-m/)

[ダウンロード](https://downloads.wordpress.org/plugin/quick-flag.zip)

 * [詳細](https://ja.wordpress.org/plugins/quick-flag/#description)
 * [レビュー](https://ja.wordpress.org/plugins/quick-flag/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/quick-flag/#installation)
 * [開発](https://ja.wordpress.org/plugins/quick-flag/#developers)

 [サポート](https://wordpress.org/support/plugin/quick-flag/)

## 説明

Quick Flag resolves IP address to [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
two-letter country code and name using [ip-countryside](http://code.google.com/p/ip-countryside/)
generated database and displays country flag if required. In contrast to other IP
to country solutions this one allows you to create and update database your self
using 5 Regional Internet Registrars (RIR) databases: AFRINIC, APNIC, ARIN, LACNIC
and RIPE and ip-countryside open source application that does the work of generating
database for you. You can also update IP to country database automatically with 
single click or schedule weekly automatic updates.

**Big thanks to [Markus Goldstein](http://madm.dfki.de/goldstein/) for ip-countryside
project, weekly database updates and automatic update server used in the past. To
offload Markus server, database updates are currently generated by me and stored
inside [GitHub repository](https://github.com/Marko-M/ip-countryside-db).**

#### Quick Flag feature highlights

 * **New in v2.10**: Country names can be translated using Poedit
 * Quick Flag database can be updated using single click without updating Quick 
   Flag plugin.
 * Quick Flag database can be auto updated weekly without updating Quick Flag plugin.
 * Because of the way Quick Flag database is created it has probably the most accurate
   IP to country database you can find.
 * Database updates are generated using open source [ip-countryside](http://code.google.com/p/ip-countryside/)
   application.
 * Quick Flag provides PHP function to retrieve country code and country name for
   given IP address (see FAQ for more)
 * Quick Flag provides PHP function to retrieve country flag image for given country,
   248 flag images provided by [Mark James](http://www.famfamfam.com)

#### Other WordPress plugins supporting Quick Flag

 * Voting polls plugin [Quick Poll](http://www.techytalk.info/wordpress-plugins/quick-poll/)
 * Who is online plugin [Quick Count](http://www.techytalk.info/wordpress-plugins/quick-count/)
 * Chat plugin [Quick Chat](http://www.techytalk.info/wordpress-plugins/quick-chat/)

For more information and demo please visit [Quick Flag demo](http://www.techytalk.info/wordpress-plugins/quick-flag/)
page at [TechyTalk.info](http://www.techytalk.info/).

## スクリーンショット

[⌊Quick Flag inside who is online plugin Quick Count⌉⌊Quick Flag inside who is online
plugin Quick Count⌉[

Quick Flag inside who is online plugin [Quick Count](http://www.techytalk.info/wordpress-plugins/quick-count/)

## インストール

Quick Flag can be installed using integrated WordPress plugin installer or manually.

#### Integrated WordPress plugin installer method:

 1. Go to Plugins > Add New.
 2. Under Search, type in ’Quick Flag’.
 3. Click Install Now to install the WordPress Plugin.
 4. A popup window will ask you to confirm your wish to install the Plugin.
 5. If this is the first time you’ve installed a WordPress Plugin, enter the FTP login
    credential information. If you’ve installed a Plugin before, it will still have
    the login information.
 6. Click Proceed to continue with the installation. The resulting installation screen
    will list the installation as successful or note any problems during the install.
 7. If successful, click Activate Plugin to activate it, or Return to Plugin Installer
    for further actions.
 8. Have fun using geolocation trough your own plugin.

#### Manual method:

 1. Upload ’quick-flag’ folder from quick-flag.zip file downloaded from [Quick Flag WordPress plugin directory page](https://wordpress.org/extend/plugins/quick-flag/)
    to the ’/wp-content/plugins/’ directory.
 2. Activate ’Quick Flag’ plugin through the ’Plugins’ menu in WordPress.
 3. Have fun using geolocation trough your own plugin code.

## FAQ

  How do I test is Quick Flag installed properly?

You can place `[quick-flag]` shortcode to add current IP address country name and
flag image to your page or post. To display country name and flag image of IP address
other than current you can use this shortcode like `[quick-flag ip="some_ip_address"]`.

  Can you provide example for fetching country info and flag for imaginary `123.123.123.123`
IP address from country Croatia?

You can use something like this:

    ```
    // Query database with following IP address
    $ip_address = '123.123.123.123';

    global $quick_flag;
    if(isset($quick_flag) && is_object($quick_flag)){
        if(($info = $quick_flag->get_info($ip_address)) != false){
            $version = $info->version;      // Quick Flag version (float): 2.00
            $ip = $info->ip;                // IP address (string): 123.123.123.123
            $code = $info->code;            // Country code (string): HR
            $name = $info->name;            // Country name (string): Croatia
            $latitude = $info->latitude;    // Country latitude (float): 45.1667
            $longitude = $info->longitude;  // Country longitude (float): 15.5
            $flag = $quick_flag->get_flag($info, 'my-own-css-class'); // CSS class is optional, 'quick-flag' by default
        }
    }
    ```

$flag variable will contain following string:

    ```
    <img
        class="my-own-css-class"
        title="Croatia"
        src="http://www.yoursite.com/wp-content/plugins/quick-flag/img/flags/HR.gif"
    />
    ```

  How do I translate country names to my own language?

Like most WordPress plugins Quick Flag can be translated using gettext. You can 
use Poedit application to open translation template from ‘languages’ directory or
you can use [Quick Flag online translation interface](http://www.techytalk.info/wordpress-plugins/quick-flag/#translations).
Please keep in mind that after you change your blog language or update language 
files you must trigger database update to update country names inside database. 
Currently the easiest way to do this is to delete ip2country.db and ip2country.version
files from ‘database’ directory and click ‘Update’ button in Quick Flag settings.

## 評価

![](https://secure.gravatar.com/avatar/d8a3a7bdeaab19b55d4755b1ac878c7b342fb321f4e50b76d5d1b7402339a2d3?
s=60&d=retro&r=g)

### 󠀁[Quick Flag](https://wordpress.org/support/topic/quick-flag/)󠁿

 [KathleenH](https://profiles.wordpress.org/kathleenh/) 2016年10月27日

We installed this ages ago and it is still working well as we have updated our WP.
Thanks!

![](https://secure.gravatar.com/avatar/12c3894e87084de2a5b01d14a337695336739ce5900a9c415114ee60e8533f5e?
s=60&d=retro&r=g)

### 󠀁[Good job!](https://wordpress.org/support/topic/good-job-593/)󠁿

 [WaKeMaTTa](https://profiles.wordpress.org/wakematta/) 2017年2月7日

good job

 [ 3件のレビューをすべて表示 ](https://wordpress.org/support/plugin/quick-flag/reviews/)

## 貢献者と開発者

Quick Flag はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献してい
ます。

貢献者

 *   [ Marko-M ](https://profiles.wordpress.org/marko-m/)

[“Quick Flag” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/quick-flag)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/quick-flag/)するか、[SVN リポジトリ](https://plugins.svn.wordpress.org/quick-flag/)
をチェックするか、[開発ログ](https://plugins.trac.wordpress.org/log/quick-flag/)
を [RSS](https://plugins.trac.wordpress.org/log/quick-flag/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 2.12 (02.08.2019.)

 * Switch ip2country database source to one kindly provided by Markus Goldstein

#### 2.11 (25.11.2012.)

 * Fix for ip2long returning signed integer on 32-bit systems

#### 2.10 (12.09.2012.)

 * Add ability to translate country names using Poedit
 * Update ISO 3166-2 country names and codes
 * Change database update URLs to GitHub repository
 * Database updated to 11.09.2012. version

#### 2.02 (23.07.2012.)

 * Code refactoring and minor cleanup
 * Fix another bug where Quick Flag fails to operate on PHP versions older than 
   5.3.0

#### 2.01 (22.07.2012.)

 * Fix bug where Quick Flag fails to operate on PHP versions older than 5.3.0

#### 2.00 (22.07.2012.)

 * Add admin settings page
 * Add single click database update feature and admin settings button
 * Add auto database update feature and admin settings toggle checkbox
 * quick_flag_get_info() deprecated. Use $quick_flag->get_info() instead.
 * quick_flag_get_flag() deprecated. Use $quick_flag->get_flag() instead.
 * Database updated to 17.07.2012. version

#### 1.14 (07.07.2012.)

 * Database updated to 03.07.2012. version

#### 1.13 (23.04.2012.)

 * Database updated to 17.04.2012. version

#### 1.12 (27.03.2012.)

 * Database updated to 27.03.2012. version

#### 1.11 (17.03.2012.)

 * Fix bug where all users were resolved to country Croatia

#### 1.10 (16.03.2012.)

 * Database updated to 13.03.2012. version
 * Place latitude and longitude data inside
 * Add new global variable $quick_flag_version
 * Place Quick Flag version inside data returned by `quick_flag_get_info()`. If 
   you are using cookies to store users geolocation data you can easily check cookie
   for Quick Flag version that created this data. If data is not up to date you 
   can fetch new data and update cookie.
 * Split country and ip ranges data into separate tables, join them when necessary.
   This gives us around 40% database size reduction.

#### 1.00 (06.03.2012.)

 * Initial release
 * Database updated to 06.03.2012. version

## メタ

 *  バージョン **2.12**
 *  最終更新日 **7年前**
 *  有効インストール数 **100+**
 *  WordPress バージョン ** 3.0またはそれ以降 **
 *  検証済み最新バージョン: **3.4.2**
 *  言語
 * [English (US)](https://wordpress.org/plugins/quick-flag/)
 * タグ
 * [geolocation](https://ja.wordpress.org/plugins/tags/geolocation/)[ip to country](https://ja.wordpress.org/plugins/tags/ip-to-country/)
   [ip2country](https://ja.wordpress.org/plugins/tags/ip2country/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/quick-flag/advanced/)

## 評価

 5つ星中5つ星

 *  [  3 5-星レビュー     ](https://wordpress.org/support/plugin/quick-flag/reviews/?filter=5)
 *  [  0 4-星レビュー     ](https://wordpress.org/support/plugin/quick-flag/reviews/?filter=4)
 *  [  0 3-星レビュー     ](https://wordpress.org/support/plugin/quick-flag/reviews/?filter=3)
 *  [  0 2-星レビュー     ](https://wordpress.org/support/plugin/quick-flag/reviews/?filter=2)
 *  [  0 1-星レビュー     ](https://wordpress.org/support/plugin/quick-flag/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/quick-flag/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/quick-flag/reviews/)

## 貢献者

 *   [ Marko-M ](https://profiles.wordpress.org/marko-m/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/quick-flag/)

## 寄付

このプラグインが今後も改善できるよう応援しませんか ?

 [ このプラグインに寄付 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CZQW2VZNHMGGN)