Permalink
Browse files

Add ISP example

  • Loading branch information...
1 parent d9ea1de commit b961a0b625c3da89616657783693bd25e85d62ec @borisz borisz committed with oschwald Sep 19, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 ispExample.cs
View
@@ -0,0 +1,12 @@
+//an example of how to lookup the isp or org of a ip address
+using System;
+using System.IO;
+class Appa0{
+ public static void Main(String[] args){
+ //open the database
+ LookupService ls = new LookupService("/usr/local/share/GeoIP/GeoIPISP.dat", LookupService.GEOIP_STANDARD);
+ //get org of the ip address
+ String orgorisp = ls.getOrg("24.24.24.24");
+ Console.Write(" isp: " + orgorisp + "\n");
+ }
+}

0 comments on commit b961a0b

Please sign in to comment.