sPhone/src/apis/sertexID.lua

56 lines
1.2 KiB
Lua
Raw Normal View History

2015-09-03 18:27:09 +02:00
--[[
Sertex ID API - Made by Ale2610
PHP by Luca_S
]]--
local SERVER = "http://sertex.esy.es/"
function status()
local isUp = http.get(SERVER.."status.php").readAll()
if isUp == "true" then
return true
else
return false
end
end
function login(username, password)
local login = http.post(SERVER.."login.php", "user="..username.."&password="..password).readAll()
if login == "true" then
return true
else
return false
end
end
2015-09-03 18:33:21 +02:00
function register(username, password)
local register = http.post(SERVER.."register.php", "user="..username.."&password="..password).readAll()
if register == "Success!" then
return true
else
return false, register
end
end
function checkUser(username)
local check = http.post(SERVER.."check.php", "user="..username).readAll()
if check == "true" then
return true
else
return false
end
end
function sendSMS(username, password, to, msg)
2015-09-21 23:29:37 +02:00
local send = http.post(SERVER.."send.php","user="..username.."&password="..password.."&to="..to.."&message="..message).readAll()
2015-10-04 21:10:10 +02:00
if send == "true" then
2015-09-21 23:29:37 +02:00
return true
else
return false,send
end
2015-09-03 18:33:21 +02:00
end
function updateSMS(username, password, all, from)
end