Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add ISP example

  • Loading branch information...
commit b961a0b625c3da89616657783693bd25e85d62ec 1 parent d9ea1de
@borisz borisz authored oschwald committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 ispExample.cs
View
12 ispExample.cs
@@ -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");
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.