GeoPlugin Script

Todas los scripts relacionados con AMS.
GeoPlugin Script es un codgo que nos permite mostrar la informacion de una ip en concreto, este script usa un soporte de google, espero que os guste.

Código:
Geo = {};

function Geo.GetInformation(strIP)
	local strCode = HTTP.Submit("http://www.geoplugin.net/xml.gp?ip="..strIP, {}, SUBMITWEB_GET, 20, 80, nil, nil);
	if (strCode == "") then
		return false
	else
		XML.SetXML(strCode);
		if (Application.GetLastError() ~= 0) then
			return false
		else
			return true
		end
	end
end

function Geo.GetCountry()
	return XML.GetValue("geoPlugin/geoplugin_countryName");
end

function Geo.GetCity()
	return XML.GetValue("geoPlugin/geoplugin_city");
end

function Geo.GetLatitude()
	return XML.GetValue("geoPlugin/geoplugin_latitude");
end

function Geo.GetLongitude()
	return XML.GetValue("geoPlugin/geoplugin_longitude");
end

function Geo.GetContinentCode()
	return XML.GetValue("geoPlugin/geoplugin_continentCode");
end

function Geo.GetRegion()
	return XML.GetValue("geoPlugin/geoplugin_region");
end

function Geo.GetRegionCode()
	return XML.GetValue("geoPlugin/geoplugin_regionCode");
end

function Geo.GetCountryCode()
	return XML.GetValue("geoPlugin/geoplugin_countryCode");
end

function Geo.GetCurrencyCode()
	return XML.GetValue("geoPlugin/geoplugin_currencyCode");
end

function Geo.ClearCache()
	XML.SetXML("");
end
Ejemplo:
if Geo.GetInformation(System.GetLANInfo().IP) then
	-- load all information
	local strCountry = Geo.GetCountry();
	local strCountryCode = Geo.GetCountryCode();
	local strCity = Geo.GetCity();
	local numLatitude = Geo.GetLatitude();
	local numLongitude = Geo.GetLongitude();
	local strContinentCode = Geo.GetContinentCode();
	local strRegion = Geo.GetRegion();
	local numRegionCode = Geo.GetRegionCode();
	local strCurrencyCode = Geo.GetCurrencyCode();
	
	-- Error filter
	if (strCountry ~= "")
	and (strCountryCode ~= "")
	and (strCity ~= "")
	and (numLatitude ~= nil)
	and (numLongitude ~= nil)
	and (strContinentCode ~= "")
	and (strRegion ~= "")
	and (numRegionCode ~= nil)
	and (strCurrencyCode ~= "")
	then
		-- All Text
		ALL_str = "Country: "..strCountry.."\r\nCountry Code: "..strCountryCode.."\r\nCity: "..strCity
		ALL_str = ALL_str.."\r\nLatitude: "..numLatitude.."\r\nLongitude: "..numLongitude.."\r\nContinentCode: "..strContinentCode
		ALL_str = ALL_str.."\r\nRegion: "..strRegion.."\r\nRegionCode: "..numRegionCode.."\r\nCurrencyCode: "..strCurrencyCode
		
		-- Set Input text
		Input.SetText("Input1", ALL_str);
	end
	-- Clear Cache 
	Geo.ClearCache();
end
Podréis encontrar el APZ aquí: viewtopic.php?f=12&t=1232
thank you
:google: "Translate attack"

Gracias Ceone para el excelente guión.

Creo que para usar este script con Lua Socket también evitar cualquier retraso de la HTTP.Submit colgando de la aplicación

EDIT: Pero Multiupload está abajo... otro lugar?
timveer escribió::google: "Translate attack"

Gracias Ceone para el excelente guión.

Creo que para usar este script con Lua Socket también evitar cualquier retraso de la HTTP.Submit colgando de la aplicación

EDIT: Pero Multiupload está abajo... otro lugar?

APZ update...

Podréis encontrar el APZ aquí: viewtopic.php?f=12&t=1232