GeoJoe Release API
GeoJoe, a UK-based IP Geolocation outfit, have just unleashed a smart little API.
The GeoJoe API can:
- Fetch Geolocation data for single IP addresses;
- Fetch XML geolocation data for a batch of IP addresses (CSV);
- Embed a Geolocation badge based on visitor or passed IP address;
- Embed a country flag based on visitor or passed IP address;
- Embed a Flash map with real-time visitor plotting (coming soon)
Badge and flag images are generated on-the-fly using PHP’s GD library.
Displaying a Geolocation Badge
To display a badge to your visitors, simply set your image src attribute as below:
<img src="http://www.geojoe.co.uk/api/badge/" alt="" />The badge accepts a number of variables:
- Text colour;
- Background colour;
- Border colour;
- IP Address
If you don’t specify an IP address, it uses the visitor’s. The below badge was generated using the google.com IP address (72.14.207.99):
<img src="http://www.geojoe.co.uk/api/badge/?ip=209.85.171.99&text=orange&border=orange&bg=white" alt="" />Displaying a Flag
The flag is displayed in much the same way as the badge, by setting the image src property to http://www.geojoe.co.uk/api/flag. If you don’t specify an IP address, the visitor’s is used.
<img src="http://www.geojoe.co.uk/api/flag/" alt="" />You can also pass an ip address. The example below uses the google.com IP address (72.14.207.99):
<img src="http://www.geojoe.co.uk/api/flag/?ip=209.85.171.99" alt="" />Other Features
They’ve also got plans to release a real-time Flash visitor map. Check out GeoJoe’s main website at http://www.geojoe.co.uk or read more about their API at http://www.geojoe.co.uk/api.
No Comments »
RSS feed for comments on this post. TrackBack URL
Leave a comment
You must be logged in to post a comment.