Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (398)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
How to get Country By IP Address in PHP
Useful PHP Code Snippets for Developers - How to get Country By IP Address in PHP
✍: Guest
'', 'city'=>''); if(filter_var($client, FILTER_VALIDATE_IP)){ $ip = $client; }elseif(filter_var($forward, FILTER_VALIDATE_IP)){ $ip = $forward; }else{ $ip = $remote; } $ip_data = @json_decode (file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip)); if($ip_data && $ip_data->geoplugin_countryName != null){ $result['country'] = $ip_data->geoplugin_countryCode; $result['city'] = $ip_data->geoplugin_city; } return $result; } ?>
2015-06-19, 1364🔥, 0💬
Popular Posts:
How to insert a dynamic field code manually in Microsoft Word? I know how the field code works. If y...
How to add comments on slides? I am reviewing someone else's presentation and I want to add some com...
Why I getting the "Error! No text of specified style in document." in Microsoft Word? You are gettin...
How to run Fitbit Connect for the first time and create a new account on Fitbit server? I have Fitbi...
How to use MomoCast with Safari on iPhone and iPad to cast Website and video to Chromecast on TV? If...