Search Wiki:
Project Description
This is a .NET 3.5 library that retrieves the country information for an Internet Protocol version 4 (IPv4) Address, by extending the System.Net.IPAddress class.

The most common use for this library would be determining the destination of a user connecting to your website or application. You could then localise the webpages or data based on there IPv4 address geospatial location.


Information provided

  • Country name (eg. Australia)
  • Country ISO 3166 2-Code (eg. AU)
  • Country ISO 3166 3-Code (eg. AUS)
  • Registry. (eg. APNIC)
  • Date the IP Address (range) was added to the data source (if known).


Sample C# code

using System.Net;
using WorldDomination.Net;
 
IPAddress ipAddress = new System.Net.IPAddress(0x2414188f);  // Some IPv4 address in the USA.
string country = ipAddress.Country(); // return value: UNITED STATES
string iso3166TwoLetterCode = ipAddress.Iso3166TwoLetterCode(); // return value: US



The project was developed with the following :-
  • .NET 3.5 framework :: automatic properties, extension methods and anonymous types,
  • LINQ to OBJECTS to retrieve the data
  • Free geospatial data provided kindly by Webnet77 under the terms of the General Public License.


-= Update 23rd May 2008 =-
Codeplex team didn't like my original logo and locked the project (thanks guys for notifying me!). Logo updated, project reopened. Appologies for any inconvience this might have caused.
Last edited May 24 at 3:17 AM  by purekrome, version 5
Comments
No comments yet.

Updating...