Sat 28 Oct 2006
I released Easy IP2Country - a new Wordpress plugin that shows an country icon flag next to the comment author name.
the plugin is based on IP2C, and is very simple to install: simply unzip in your plugins directory and activate.
Screenshot

May 8th, 2007 at 9:58 pm
I get 404 on http://firefang.net/projects/firestats/wiki/EasyIP2Country
May 8th, 2007 at 10:19 pm
I updated the link, thanks.
June 11th, 2007 at 1:04 am
Hallo omry
Thank you for your plugin but I question I have:
How do you made your Browser Detection, did you use a plugin? First did you use Wordpress?
Thank you in advance for any answer!
Namaste
Elena
June 11th, 2007 at 1:10 am
Aha I have ssen you use the Broweser Detection from here:
http://priyadi.net/archives/2005/03/29/wordpress-browser-detection-plugin/
June 11th, 2007 at 1:26 am
Sorry for disturbing another again, did I must know something about your “Easy IP2Country” PlugIn, did I must update any database or something? Thank you in advance!
Elena
June 11th, 2007 at 8:16 am
Elena, there are very clear and simple instructions in the site : http://firestats.cc/wiki/EasyIP2Country
in any case, I strongly suggest that you used FireStats instead of those two plugins (it does what those two do and so much more).
June 11th, 2007 at 1:45 pm
Thank you for the answer, I understand!
Another question, you use “Broser Detection”, and how do you made that it shows only the icons without the string or any text. And how do you integrate the tooltip? I would be very helpfull, thank you in advance and I appreciate it !
Elena
June 11th, 2007 at 2:07 pm
you can look at the html code.
basically, you use a title attribute inside the a tag.
June 11th, 2007 at 10:15 pm
Sorry Omry for disturbing again, I have try to see your html with the Firefox Extension “Firebug” without success.
I have try to make some new function in browsniff.php but maybe I do something wrong.
——————————————-
function pri_get_image_url_title ($code, $alt, $title) {
global $pri_image_url, $pri_image_path, $pri_width_height;
$alt = htmlspecialchars($alt);
$code = htmlspecialchars($code);
if (file_exists(”$pri_image_path/$code.png”)) {
return ” “;
} else {
return “”;
}
}
function pri_image_only(){
global $user_ID, $post, $comment;
get_currentuserinfo();
if (!$comment->comment_agent) return;
list($browser_name, $browser_code, $browser_ver, $os_name, $os_code,
$os_ver, $pda_name, $pda_code, $pda_ver ) = pri_detect_browser($comment->comment_agent);
$title = $browser_name . ” (” . $browser_ver . “) ” . $os_name;
echo pri_get_image_url_title($browser_code, $browser_name, $title);
}
——————————————-
Did you can show me your browssniff.php or your function? i apologize for the inconvienence!
Namaste
Elena
June 11th, 2007 at 10:23 pm
Elena, to see html use your browser view->source menu option.
June 13th, 2007 at 5:11 pm
The script mentioned here is an open source and dependency free. It fits best php-aware coders but, as it is a single php class script file that needs mysql access, it is very easy to use for almost anyone.
Hooray to free open source. Down with old outdated ip2country databases.
June 13th, 2007 at 9:18 pm
and my script is also free, open source, dependency free and does not even need mysql access.
how `bout that?
June 13th, 2007 at 9:23 pm
not to mention its probably much faster than anything that has something to do with a database can possibly be. (1200 searches/second).
June 28th, 2007 at 2:12 pm
don’t we need like a php code for the flag to show up beside the commenters name?
June 28th, 2007 at 2:14 pm
no, its automagic.
June 28th, 2007 at 2:16 pm
really but it’s not showing up on my site:)
June 28th, 2007 at 2:23 pm
try FireStats.
this plugin is no longer supported.
August 25th, 2007 at 12:11 pm
Hello!!
Thank you for your sharing this plugin of wordpress!
After I have upload this to my server, and I could see it from the Plugins in my admin page. But after I active it, and i test on the comment, it doesn’t work at all.
Did I miss to add something else? I shall be very much appreciated if you could drop a few sentences for this?
Thank you very much!!
Sherry
August 25th, 2007 at 12:17 pm
Shere, read this
August 25th, 2007 at 4:27 pm
Thank you very much Omry,
Thank you for your kind linkage where I install the Firestats and the Flag plugin does work.
And there came the new problem:
the flag it detect is not a Chinese national flag, but the UK and I notice the Ip address is either not a Chinese IP address.
Sorry for the constant bothering.
Thanks a lot!!
Sincerely,
Sherry
August 25th, 2007 at 4:28 pm
Sorry, but I notice the Flag shown here is also a UK flag….
But I am in China…..
August 25th, 2007 at 4:39 pm
Sheri,
this is Australia’s flag (check the tooltip).
I am using the ip-to-country database from http://ip-to-country.webhosting.info/, and this is what it says.
you can contact webhosting.info about it and on their next update it will detect your country correctly.
August 26th, 2007 at 4:41 am
Thank you Omry not only for your nice plugin but also your suggestion and assistance in instaling and so on!!!
Sincerely,
Sherry
October 12th, 2007 at 11:14 pm
Hi, Omry! Sorry for disturbing, but I must ask you this. Do you here use this plugin, or complete FireStats? (are you author of FireStats?)
For browsers and OSs: do you use Browser Detection Plugin or this is integrated in FireStats?
Thanks,
Milan
October 21st, 2007 at 11:46 am
thanks for the plugin… some comments doesnt show country flag? why is it so? this problem is only for few comments.. is that IP not identifiable?
October 21st, 2007 at 11:47 am
hey my country is not australia.. I am from India..
October 21st, 2007 at 11:51 am
Yes, if a flag does not appear the database does not contain the IP address.
I suggest that you use FireStats as it contains an updated database and can also update it easily when a new database is released.
as for the country flag (India vs Australia):
I guess I need to update the IP2C database in this blog. I am using a rather ancient version of FireStats here.
October 21st, 2007 at 11:54 am
Milan:
I am using FireStats, but it’s very old and I`ll upgrade it soon.
FireStats has it’s own browser detection code, that is based on the plugin that you pointed to (see the FireStats Credits page.
October 21st, 2007 at 11:56 am
Milan:
Just checked, and this blog does not use FireStats (It’s deactivated) but the two other plugins.
I`ll migrate it to FireStats when I get some time.
October 22nd, 2007 at 4:10 am
don’t work with mu
just in admin blog ?
October 22nd, 2007 at 8:30 am
try FireStats 1.4 instead.
October 29th, 2007 at 1:21 am
I didn’t saw your answer ’till now (you should install Subscribe to Comments plugin :))
I don’t understand your answers. First you say:
then
So, what do I need to install (this or what)?
October 29th, 2007 at 8:07 am
I made a mistake, this blog is not very active and I forgot what it runs.
in order to install FireStats you need to follow the simple instructions here:
http://firestats.cc/wiki/hosted_wordpress
November 8th, 2007 at 3:25 pm
thanks for the plugin, I have been looking for this one for a while. Scott
November 14th, 2007 at 5:18 pm
[…] Easy IP2Country: This adds the little flag next to your name when you make a comment. No, it doesn’t make the blog more functional, but it is popular - I have had more remarks about this plug in than any of the other visible ones I use. […]
December 24th, 2007 at 4:21 am
hi from chile
January 8th, 2008 at 10:03 am
Thanks for plugin, just wondering how if I want to add {name} from {country}?
February 10th, 2008 at 9:39 am
Hi,
i have applied this function on our blog, www.alqamar.info/blog
but the flag appears on some comments, and mostly not against comments.
kindly help
February 24th, 2008 at 9:21 am
Haroon,
it only shows icons of countries it recognizes (from the internal ip2c database).
be sure to upgrade to latest version if you haven’t (and you haven’t).
Yoki, look at the plugin source and edit it.
you may also need to look at the ip2c api at http://firestats.cc/wiki/ip2c to figure out how to get the name.
March 5th, 2008 at 6:42 pm
Home Business Opportunities How to work from home and still make a difference…
In all the jobs I had before I began working from home, I was not contributing in any great, or lasting, way to the world….