CountryHawk uses three main data files. This section provides an overview of what each file is used for, and how you may customize it to best suit your needs.
countries.cdd: This file contains the main data used by CountryHawk to map IP addresses to countries. This data is in a binary format and may not be customized or used outside of CountryHawk. cyScape releases updates to this file on a regular basis to all customers who have an active subscription to the product. It is important that this file be kept up to date with cyScape's releases to ensure accurate detection.
countries.properties: This file is used to configure various settings and options for the component as follows:
country.data.file: This property is used to indicate the file name which contains the main CountryHawk map of IP addresses to countries. By default this is countries.cdd. It is not recommended you change this setting.
country.names.file: This is the default file name that contains the mapping of country codes to country names. By default this is countrynames.properties. It is not recommended you change this settings.
country.regions.file: This is the default file name that contains the definition of region codes and names. By default this is regions.properties. It is not recommended you change this settings.
country.stats.file: This is the default file name where statistics are written by the PersistToFile method of the CountryStats object.
restricted.hosts: By default the IsRestricted method uses the country codes specified in the restricted.hosts line of the countries.properties file for its list of restricted properties. You may edit this line if you wish to define your own list of restricted countries.
select.hosts: By default the GetSelectList method uses the list specified in the select.hosts line of the countries.properties file to define what countries are included in the HTML it generates for the country selection list box. You can prevent countries from being displayed in this list by removing its associated country code from the select.hosts line. Likewise you can control the order in which the countries appear in the list by changing the order of the country codes listed for this entry.
countrynames.properties: This file is used to associate a descriptive country name to with each two-letter country code. This controls the values returned by the CountryName method, as well as the names shown in the HTML select list returned by the GetSelectList method.
These names may be modified by editing the. For example if you prefer "USA" instead of "United States" you can update this file accordingly. Be careful, however, not to change any of the two-letter country codes.
Note: If you are using CountryHawk from web scripts such as ASP, ASP.NET, and ColdFusion, any changes made to these data file will not take effect until the web services are restarted.
regions.properties: This file is used to define regions and to associate each country with a region. This allows you to easily determine which region a visitor hitting your site is in, and is also very useful for statistical analysis. By default CountryHawk defines regions based on geographical location, such as North America, Western Europe, and Scandinavia. CountryHawk provides complete flexibility over how you define regions and associate countries with regions. See the section on Defining Regions for more information.
See Also:
About the CountryHawk Users Guide