#include <String.au3>
#include <Array.au3>
Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
Global Enum $IP,$CountryCode,$CountryName,$RegionCode,$RegionName,$City,$ZipCode,$Latitude,$Longitude,$MetroCode,$AreaCode,$urlimagen
Local $Datos=IPinfo("129.90.255.255")
_ArrayDisplay($Datos)
ShellExecute($Datos[$urlimagen])
ClipPut($Datos[$urlimagen])
Func IPinfo($ip_or_hostname)
local $HTMLSource,$Datos[12],$Dato
$oHTTP.Open("GET","http://freegeoip.net/xml/" & $ip_or_hostname)
$oHTTP.Send("")
$HTMLSource = $oHTTP.Responsetext
If not (StringStripWS($HTMLSource,8)="NotFound") Then
$Dato=_StringBetween($HTMLSource,"<Ip>","</Ip>")
$Datos[$IP]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<CountryCode>","</CountryCode>")
$Datos[$CountryCode]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<CountryName>","</CountryName>")
$Datos[$CountryName]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<RegionCode>","</RegionCode>")
$Datos[$RegionCode]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<City>","</City>")
$Datos[$City]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<ZipCode>","</ZipCode>")
$Datos[$ZipCode]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<Latitude>","</Latitude>")
$Datos[$Latitude]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<Longitude>","</Longitude>")
$Datos[$Longitude]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<MetroCode>","</MetroCode>")
$Datos[$MetroCode]=$Dato[0]
$Dato=_StringBetween($HTMLSource,"<AreaCode>","</AreaCode>")
$Datos[$AreaCode]=$Dato[0]
$Datos[$urlimagen]="http://flagpedia.net/data/flags/small/"& StringLower($Datos[$CountryCode]) & ".png"
Return $Datos
EndIf
Return ""
EndFunc
saludos