ip2cc supports displaying flag in node's link area

According to the flag in comment’s link area, now ip2cc is able to display flag in node’s link area also. These 2 features was suggested by Larry. The use of these capabilities, pointed out by Larry, is to verify the location of the visitor in E-Commerce sites.

What to see a demonstration? See below. You should see I am currently in Thailand.

Technorati Tags: , , , , , , ,

works perfectly...awesome idea

I think a module like this has many uses. Particularly these days, as location verification has become more important in ecommerce. Is it 100%? No, of course not. But it's a big step in the right direction and let's others know that you are serious about the integrity of the information submitted to your site. Recently, I've also talked to another drupal user who wrote, from scratch, an IM client for his dating ite. The client is then used by members to chat with one another. He said he lans to release the code later. We'll see. In any case, I like this idea beause it turns Drupal into a more 'distributed platform'. An IM client that could use the funtionality of ip2cc is a interesting idea. What do you all think? cheers, larry

a bit off topic, but ...

How do I run fetchdb.sh on a windows machine, to set up the ip to country database? I looked at the file, and created the mysql tables, but I'm not sure how to insert the data from the excel file.

I had the same problem...

My problem was solved by sugree, author of the module and headhocho of this site. He was kind enough to send me the populated mysql table that this script creates. If you like, I can send it to you. For obvious reasons, I don't want to post my email address here. I get enough penis enlargement offers and get rich quick schemes already. However, you can either join this site and mail me using the contact form or mail me from Drupal.org. My ID is also 'larry' over there. cheers, larry

ipdb.mysql now on this site

Hey, thanks very much for your reply. I just read the updated install text (from cvs), and sugree has put the mysql database on this site at https://howforge.com/modules/ip2cc/ipdb.mysql ... although it's unzipped, so quite large. I'll install it, and if I have any problems I'll message you here or at Drupal. BTW, do .sh files run under linux or something?

Good question...

I believe .sh files run under linux and unix, judging from the commands in the script. I'm a windows(although that's slowly changing!) guy, so I'm not 100% certain. My guess is, you could run it under windows if you had 'cygwin' installed. This simulates a unix environment and allows you to run Unix commands, such those in this script, from the command line. Still, I'm just guessing. By the way, this IP module works very well. Good luck. cheers, larry

I downloaded cvs but ...

the module is producing a lot of errors (perhaps because I am using it on a localhost?) Also, ip2cc doesn't appear in the admin/settings menu. If I manually go the url, it loads up okay though.

update module

You have to disable and then enable module when the module has been added menu.

cygwin should run fetchdb.sh

It is possible to run fetchdb.sh under cygwin but you need to install wget.

That fixed it - thanks.

The menu is now displaying.

What might be causing this error?

user warning: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' query: SELECT i.*,c.* FROM ip2cc i LEFT JOIN iso3166 c ON i.country_code = c.country_code2 WHERE ip_from <= 3401523799 AND ip_to >= 3401523799 in C:\folder2\web33\great_violinists\includes\database.mysql.inc on line 124.

different collations

Oops! It seems you are using drupal 4.6.x so the collation is still latin1 on MySQL 4.1.x. In this case, you have 3 choices. 1. upgrade to 4.7.0 beta 4 so everything will be converted to utf8 2. modify iso3166.mysql, (ipdb.mysql or ip2cc.mysql), and ip2cc_addon.mysql by replacing "/*!40100 DEFAULT CHARACTER SET utf8 */ ;" with ";" and rerun these scripts again 3. alter charset and collation of table ip2cc, iso3166, and ip2cc_node to latin1 Sorry for inconvenience.

No inconvenience!

Thank you for creating the module! I was using 4.7b4. I think the problem must have been a clash with some other module. I started again with a new database, and removed all the other modules, and now I am not getting the errors. For every node or comment created, the database is correctly storing the IP. In the settings, I can choose which nodes or comments display flags, but they are not appearing. Do I need to configure settings, and also add some code to my theme? If so, what code?

missing flag

You don't need to modify theme. The flag should appear in link area. If you don't see the flag, probably you didn't install flags yet or your IP is totally unknown.

cool. I did'nt know that....

Is wget one of the packages available with the cygwin download. I mean, when deciding which parts of cygwin you want ( because a full install is huge!) is this another possible package to take as part of your download? larry

wget

Yes, it is.

Back to getting the same errors ...

Strange. I'll try this module again when 4.7 is out of beta perhaps.

eu.png flag image...any idea where to get it?

I've discovered that some IP addresses are under the eu heading, but the is no image vailable for this in the http://ip-to-country.webhosting.info/flag/awstatsflags downloads. So I just get a blank square attached to the node instead of a flag, but the hover information is still available. Any idea where I can get it? cheers, larry

eu and gb

eu and gb doesn't conform to the iso3166 so there is no flag for them provided by awstats. Anyway, gb is uk and eu actually has their . So you can copy uk.png to gb.png and choose an eu flag and resize it to 14x14. I will do it tomorrow if you can wait...

I'm sending you the images

Hello Sugree, Thanks for our reply. I've checked and in my download I've gotten the gb.png with it. However, I've found a nice eu flag and I've resized it and converted the format to .png. I'm sending it and the gb image to you now. You can't have all the fun! thanks, larry

ip2cc drupal module error

hi and thanks for your work! i'm getting: user warning: Unknown column 'i.country_code' in 'on clause' query: SELECT i.*,c.* FROM ip2cc i LEFT JOIN iso3166 c ON i.country_code = c.country_code2 WHERE ip_from <= 1151208626 AND ip_to >= 1151208626 in c:\roadskater\includes\database.mysql.inc on line 120. i believe i've applied everything correctly, but obviously perhaps not. i have 3 tables related to ip2cc it seems, with stucture as such: ip2cc IP_FROM double No 0 IP_TO double No 0 COUNTRY_CODE2 char(2) latin1_swedish_ci No COUNTRY_CODE3 char(3) latin1_swedish_ci No COUNTRY_NAME ip2cc_node nid int(10) UNSIGNED No 0 hostname varchar(128) latin1_swedish_ci Yes NULL iso3166 country_code2 char(2) latin1_swedish_ci No country_code3 char(3) latin1_swedish_ci No country_name varchar(80) latin1_swedish_ci No country_number int(3) No 0 any thoughts? thanks, rsn2.com

ipdb.mysql

Oops! It's all my fault. Please get ipdb.mysql from my latest post. ip2cc.mysql is now obsoleted.

Post new comment