From 972a6fa56add4efd50e148a6084c876d442fdb2c Mon Sep 17 00:00:00 2001 From: Ale2610 Date: Thu, 3 Sep 2015 18:27:09 +0200 Subject: [PATCH] Create sertexID.lua --- src/apis/sertexID.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/apis/sertexID.lua diff --git a/src/apis/sertexID.lua b/src/apis/sertexID.lua new file mode 100644 index 0000000..f1a2cef --- /dev/null +++ b/src/apis/sertexID.lua @@ -0,0 +1,24 @@ +--[[ + 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