Aug
10 2010
I am quite busy for the pass 1-2 months and did not update this blog.
Today I would like to share a simple and useful script to all on how to retrieve visitor country information.
It is useful when you want to analysis/track your visitor information (similar with those webstats that show the visitors country information)
I am using the api service from the hostip.info.
By passing the visitor IP Address to api service, it will return the country information to your script.
Example:
<?php $ipAddr = $_SERVER["REMOTE_ADDR"]; $country_content = file_get_contents("http://api.hostip.info/get_html.php?ip=".$ipAddr); echo $country_content; ?> |
Sample Result:
Country: SINGAPORE (SG) City: Singapore IP: XXX.XXX.XXX.XXX |
- » wp to twitter error
- » PHP send email request read receipt
- » customize SugarCRM out-of-box module field(s)
- » PHP generate calendar file (ics)
- » PHP connect to LDAP

















August 24th, 2011 at 1:19 pm
What’s Going down i am new to this, I stumbled upon this I’ve discovered It absolutely helpful and it has helped me out loads. I am hoping to contribute & aid different users like its aided me. Good job.