Credit: This is a modification of the Bermi Labs IP to country web service. Its purposes are to link IPs with ISO 3166-3 country codes, and to link 2 and 3 character country codes with country names.
Like all web services, the input is a URL and the output is a string. In the example
http://www.lakeinfoworks.com/webservices/country/ip/abbr3/1044964400
| http://www.lakeinfoworks.com | The server |
| webservices | The web service's location on the server. |
| country | The name of the PHP program that fetches the data. |
| ip | Describes the input, an IP address |
| abbr3 | Describes the output, a 3 character abbreviation. |
| 1044964400 | The IP address |
Put into your browser and you will get “FIN” echoed. Additional URI elements that may be used for either input or output are
There is one more feature that may be of some use. It is the input “all”. In the example
http://www.lakeinfoworks.com/webservices/country/all
The returned value is all of the countries. The countries are delimited by “\n” characters. Each country is a “|” delimited string consisting of the country's 3 character code, its 2 character code and its name.
Within an Akelos program, you may code:
The webservice at Lakeinfoworks should not be used in production sites because your application will break whenever this site goes down or the program fails due to continuing development. Following are instructions for installing this webservice on your server.
Your web service is ready for use.