Changes between Version 9 and Version 10 of ip2c


Ignore:
Timestamp:
Oct 27, 2006, 11:53:23 AM (15 years ago)
Author:
omry
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ip2c

    v9 v10  
    1515IP2C 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.
    1616
    17 == Usage ==
    18 To resolve an IP address:[[BR]]
    19 '''java -jar ip2c.jar ip-address'''[[BR]]
    20 Output format:[[BR]]
    21 if not found:[[BR]]
    22 UNKNOWN[[BR]]
    23 [[BR]]
    24 if found:[[BR]]
    25 2C 3C NAME[[BR]]
    26 [[BR]]
    27 Example:[[BR]]
    28 '''java -jar ip2c.jar 85.64.225.159'''[[BR]]
    29 Outputs:[[BR]]
    30 IL ISR ISRAEL[[BR]]
    31 [[BR]]
    32 To build binary file from CSV file:[[BR]]
    33 '''java -jar ip2c csv_file bin_file'''[[BR]]
     17
     18== JAVA ==
     19Usage :
     20To resolve an IP address:
     21java -jar ip2c.jar ip-address
     22Output format:
     23if not found:
     24UNKNOWN
     25
     26if found:
     272C 3C NAME
     28
     29Example:
     30java -jar ip2c.jar 85.64.225.159
     31Outputs:
     32IL ISR ISRAEL
     33
     34To build binary file from CSV:
     35java -jar ip2c csv_file bin_file
     36
     37== PHP ==
     38Install the ip2country.php and the binary file in the same directroy.
     39
     40{{{
     41#!php
     42
     43<?php
     44require_once('ip2country.php');
     45
     46$ip2c = new ip2country();
     47$res = $ip2c->get_country("85.64.225.159");
     48if ($res == false)
     49  echo "not found";
     50else
     51{
     52  $o2c = $res['id2'];
     53  $o3c = $res['id3'];
     54  $oname = $res['name'];
     55  echo "$o2c $o3c $oname"; // will output IL ISR ISRAEL
     56}
     57?>
     58}}}
    3459
    3560== Download ==
    36 [http://firefang.net/projects/firestats/browser/trunk/ip2c/release/ip2c-1.0.zip?format=raw ip2c 1.0]
     61[http://firefang.net/projects/firestats/browser/trunk/ip2c/release/ip2c-1.1.zip?format=raw ip2c 1.1]
    3762
    3863== Source ==