How to get country name from IP address in php -


this question has answer here:

i want find country, city, latitude , longitude ip address using php. using url , returning data in xml format.

http://www.ipgp.net/api/xml/122.163.6.58

the data coming this:

<iplookup>     <ip>122.163.6.58</ip>     <code>in</code>     <country>india</country>     <flag>http://www.ipgp.net/flags/in.png</flag>     <city>calcutta</city>     <region>west bengal</region>     <isp></isp>     <lat>22.5697</lat>     <lng>88.3697</lng> </iplookup> 

can suggest how parse , result

use simplexml_load_string().


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -