C# Class BF2Statistics.ASP.Ip2nation

A class used to get Country information from IPv4 addresses
Show file Open project: BF2Statistics/ControlCenter

Public Methods

Method Description
GetCountryCode ( IPAddress IP ) : string

Gets the country code for a string IP address

GetCountyNameFromCode ( string Code ) : string

Fethces the full country name from a country code supplied from GetCountryCode()

Private Methods

Method Description
Ip2nation ( ) : System

Static Constructor: Used to create the connection string to the Ip2Nation.db file

Method Details

GetCountryCode() public static method

Gets the country code for a string IP address
public static GetCountryCode ( IPAddress IP ) : string
IP System.Net.IPAddress
return string

GetCountyNameFromCode() public static method

Fethces the full country name from a country code supplied from GetCountryCode()
public static GetCountyNameFromCode ( string Code ) : string
Code string
return string