Changes between Version 10 and Version 11 of ip2c


Ignore:
Timestamp:
Oct 27, 2006, 12:01:31 PM (15 years ago)
Author:
omry
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ip2c

    v10 v11  
    44
    55
    6 Supported languages:[[BR]]
     6== Supports ==
     7 * Command line
    78 * Java
    8  * PHP (Soon)
     9 * PHP
    910
    10 == Performance ==
    11 Current Java code takes less then 20ms to lookup an ip address on my computer.[[BR]]
    12 this is working directly on the file, so memory usage is minimal (it does not load the whole file into memory).
     11== Download ==
     12[http://firefang.net/projects/firestats/browser/trunk/ip2c/release/ip2c-1.1.zip?format=raw ip2c 1.1]
    1313
    14 == License ==
    15 IP2C is licensed under GPL2, if you would like to use it in a non-gpl application please [wiki:Contact] me to obtain a non-gpl license.
     14== Source ==
     15[source:/trunk/ip2c Browse source]
    1616
    1717
    18 == JAVA ==
     18== Command line (requires java in path) ==
    1919Usage :
    2020To resolve an IP address:
     
    3232IL ISR ISRAEL
    3333
     34
    3435To build binary file from CSV:
    3536java -jar ip2c csv_file bin_file
    3637
     38== Java code ==
     39{{{
     40#!java
     41String ip = 85.64.225.159;
     42IP2Country ip2c = new IP2Country();
     43Country c = ip2c.getCountry(ip);
     44if (c == null)
     45{
     46        System.out.println("UNKNOWN");                         
     47}
     48else
     49{
     50        // will output IL ISR ISRAEL
     51        System.out.println(c.get2cStr() + " " + c.get3cStr() + " " + c.getName());     
     52}
     53}}}
     54
    3755== PHP ==
    38 Install the ip2country.php and the binary file in the same directroy.
    39 
     56Install the ip2c.php and the binary file in the same directroy.
    4057{{{
    4158#!php
    42 
    4359<?php
    44 require_once('ip2country.php');
     60require_once('ip2c.php');
    4561
    4662$ip2c = new ip2country();
     
    5773?>
    5874}}}
    59 
    60 == Download ==
    61 [http://firefang.net/projects/firestats/browser/trunk/ip2c/release/ip2c-1.1.zip?format=raw ip2c 1.1]
    62 
    63 == Source ==
    64 [source:/trunk/ip2c Browse source]