1 (edited by Grant 2009-04-16 18:20)

Topic: IP to Country

Loads the function iptocountry() which converts an IP address into a two letter country code.

This extension doesn't actually do anything, but it could be used as a base on which to build many other geographically targeted extensions.

To download, click the flag below (hopefully your own):

http://fixpc.co.za/iplocator/flag.php

Download this updated IP database first

2

Re: IP to Country

Does anyone know how I can get this to download the updates automatically?

http://www.phptutorial.info/iptocountry/ip_files.zip

Re: IP to Country

Notice: Undefined variable: two_letter_country_code in /home/extensions/ip_to_country/iptocountry.php on line 21

roll ???

4

Re: IP to Country

When do you get this error?

Re: IP to Country

At some the flag is not shown and gives out an error...

6 (edited by Grant 2009-04-16 12:22)

Re: IP to Country

Please let me know which IP address are causing the error. This will help me to determine which ranges are missing.

Re: IP to Country

95.220.13.198

8

Re: IP to Country

Russia?

9

Re: IP to Country

I've fixed it so that it should display a question mark when it's unsure of the country. I got the database from an external site, hope the updated database is more, well, up-to-date.

Please let me know if this works. smile

Re: IP to Country

Tnx smile

11 (edited by dasunsrule32 2009-04-25 04:05)

Re: IP to Country

I cannot even unzip the files, I get this error:

[/home/user/Desktop/ip_to_country.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
zipinfo:  cannot find zipfile directory in one of /home/user/Desktop/ip_to_country.zip or
          /home/user/Desktop/ip_to_country.zip.zip, and cannot find /home/user/Desktop/ip_to_country.zip.ZIP, period.

That obviously, halts the entire install.

12

Re: IP to Country

Weird. What Zip program are you using? WinRAR seems to work fine.

Re: IP to Country

I am simply using 'unzip' for Linux.

14

Re: IP to Country

Would you like me to try uploading a different format? I'm using XP though.

Re: IP to Country

Grant wrote:

Would you like me to try uploading a different format? I'm using XP though.

Sure, I tried it in XP also, says its a bad zip file. Maybe you can upload it in tar.gz, or even bzip would be awesome! Thanks!

16 (edited by Grant 2009-05-01 08:59)

Re: IP to Country

Weird, I downloaded it again and I got the same error.

Please download again:

http://fixpc.co.za/download/ip_to_country.zip

Should be a much smaller file.

Re: IP to Country

I will give it a run again and see what happens. Thanks!

18 (edited by dasunsrule32 2009-05-02 04:40)

Re: IP to Country

Thanks Grant, got it working. One question, I am having issues in the Extensions Admin Panel, when I go in there, I get this now:

Notice: Undefined index: Extension loading error in /home/www/christiantechs/extensions/pun_admin_manage_extensions_improved/extension_list.php(310) : eval()'d code on line 74

Notice: Undefined index: Missing manifest in /home/www/christiantechs/extensions/pun_admin_manage_extensions_improved/extension_list.php(310) : eval()'d code on line 74

19

Re: IP to Country

Hmm, I'm not running pun_admin_manage_extensions_improved

Will install it on my test forum and see what it does.

Thanks for letting me know smile

Re: IP to Country

No prob, I will look in to see if you figured it out. Thanks for the extension!

21

Re: IP to Country

It would be good if extentions would add flags to online now and users today list, so flags would be attached to usernames and instead of guests ip adress there would be flag.

22

Re: IP to Country

Minor Update: added SEF URL support ie a / smile

23

Re: IP to Country

Ahmed wrote:

It would be good if extentions would add flags to online now and users today list, so flags would be attached to usernames and instead of guests ip adress there would be flag.

Do you mean the Currently online on the Index page?

24

Re: IP to Country

Grant wrote:

Weird, I downloaded it again and I got the same error.

Please download again:

http://fixpc.co.za/download/ip_to_country.zip

Should be a much smaller file.

ZIP file is broken again.

WinZip, 7Zip etc barf when attempting to open it.

25

Re: IP to Country

Please try again, should be a smaller file.