Update sms.lua
This commit is contained in:
parent
7be54351de
commit
358fe209fb
1 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,11 @@ local loading = {"|","/","-","\\","|","/","-","\\"}
|
||||||
local server = "http://sertex.esy.es/"
|
local server = "http://sertex.esy.es/"
|
||||||
local sendTo
|
local sendTo
|
||||||
|
|
||||||
|
if not sPhone then
|
||||||
|
printError("This app is for sPhone")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
--check if the server is down
|
--check if the server is down
|
||||||
local isServerUp = http.get(server.."/status.php").readAll()
|
local isServerUp = http.get(server.."/status.php").readAll()
|
||||||
if isServerUp ~= "true" then
|
if isServerUp ~= "true" then
|
||||||
|
@ -22,7 +27,7 @@ f = fs.open("/.sPhone/config/username", "r")
|
||||||
local user = f.readLine()
|
local user = f.readLine()
|
||||||
f.close()
|
f.close()
|
||||||
f = fs.open("/.sPhone/config/.sIDpw", "r")
|
f = fs.open("/.sPhone/config/.sIDpw", "r")
|
||||||
local pass = f.readLine()
|
local pass = base64.decode(f.readLine())
|
||||||
f.close()
|
f.close()
|
||||||
local head = "user="..user.."&password="..pass
|
local head = "user="..user.."&password="..pass
|
||||||
http.request(server.."login.php",head)
|
http.request(server.."login.php",head)
|
||||||
|
|
Loading…
Reference in a new issue