Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --CreeperTech LLC. using ip-api.com
- --Heres something you should know:
- --some countries are too small to have regions/states
- --so I built in an error
- --if there is no region/state, it will return Error.noRegion
- -- -Creeper9207
- function getState()
- response = http.request("http://CreeperTech.net/SysX7/location.php?get=state")
- event, url, body = os.pullEvent()
- return body.readAll()
- end
- function getCity()
- response = http.request("http://CreeperTech.net/SysX7/location.php?get=city")
- event, url, body = os.pullEvent()
- return body.readAll()
- end
- function getCountry()
- response = http.request("http://CreeperTech.net/SysX7/location.php?get=country")
- event, url, body = os.pullEvent()
- return body.readAll()
- end
Advertisement
Add Comment
Please, Sign In to add comment