View Single Post
Old 11-15-2008, 01:00 PM  
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
Originally Posted by sharphead View Post
Looks great borked... props.
thanks

for those that don't want to use javascript, and are not bothered about the detailed stats tracking with clickheat maps etc you can call one of the web APIs directly.

If you are going to call the scripts from your script, you need to pass the variable "ip" in the string, becaue otherwise it will always resolve your server's IP.

summary of available outputs:

javascript: http://www.geoplugin.net/javascript.gp?ip=xx.xx.xx.xx
php (serialized array): http://www.geoplugin.net/php.gp?ip=xx.xx.xx.xx
xml: http://www.geoplugin.net/xml.gp?ip=xx.xx.xx.xx
json: http://www.geoplugin.net/json.gp?ip=xx.xx.xx.xx

For those that want to use the currency converter output, the default base currency is US$. To set your own base currency, just tag on the variable &base_currency=XXX where XXX is the ISO 4217 3-letter code. eg

http://www.geoplugin.net/xml.gp?ip=x...e_currency=EUR

geoplugin has been running low-key for about 2.5 years now and serves this geo stuff and statistics for 13 sites, a couple of them quite major hitters. The geoplugin.net server calls are all running through C wrappers (except for the clickheat stuff which is PHP) and is extremely fast, serving somewhere in the region of 1-2mill hits per day without breaking sweat (load 0.2-0.4)

Dunno why I bothered with that sales pitch, cos its all well, free ;)


Hope it proves useful and suggestions are always welcome to improve.
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote