Advertisement
Guest User

test

a guest
Jul 9th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local args = {...}
  2.  
  3. local h = http.get("https://cc.tylertwining.com/samples/httpgathervar/1point0.php")
  4. local p0 = h.readAll()
  5. local h2 = http.get("https://cc.tylertwining.com/samples/httpgathervar/1point1.php")
  6. local p1 = h2.readAll()
  7.  
  8. h.close()h2.close()
  9.  
  10. local currentVersion = "1.0"
  11.  
  12. if #args >= 1 then
  13.   currentVersion = args[1]
  14. end
  15.  
  16. if p0 == currentVersion then
  17.   print("1point0.php says we're up to date!")
  18. else
  19.   print("1point0.php says we're out of date!")
  20. end
  21. if p1 == currentVersion then
  22.   print("1point1.php says we're up to date!")
  23. else
  24.   print("1point1.php says we're out of date!")
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement