Here is a PHP function which can return the Geo location of the submitted IP address. The function uses a free IP Locator API provided by http://ipinfodb.com/ For using this service you have to register to this website and they will provide you with an API key, with which you can access this free webservice. The function below will return the Country and City of the supplied IP Address. More details after this code ///////////// Code Start //////////////////// function countryCityFromIP _CURL($ipAddr){ $contents =""; /** * Initialize the cURL session */ $ch = curl_init(); $ipDetail=array(); //initialize a blank array /** * Set the URL of the page or file to download. */ $api_key="YOUR API KEY"; $api_url= "http://api.ipinfodb.com/v2/ip_query.php?key=".$api_key."&ip=".$ipAddr."&timezone=false"; curl_setopt($ch, CURLOPT_URL, $api_url ); curl_setopt($ch,CURLOPT_TIMEOUT,20); /** * Ask cURL to return th...