Creeper9207

datacc

Apr 14th, 2015
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. loop = true
  2. function data_set(channel, raw)
  3.   raw = raw:gsub(" ", ":S:")
  4.   http.request("http://creeper9207.com/cc/data_set.php?number="..channel.."&&data="..raw)
  5.   while loop == true do
  6.     event = os.pullEvent()
  7.     if event == "http_success" then
  8.       return "success"
  9.     elseif event == "http_failure" then
  10.       return "failure:1"
  11.     end
  12.   end
  13. end
  14. function data_get(channel)
  15.   http.request("http://creeper9207.com/cc/data_get.php?number="..channel)
  16.   event, url, data = os.pullEvent()
  17.   while loop == true do
  18.     if event == "http_success" then
  19.       return data.readAll()
  20.     elseif event == "http_failure" then
  21.       return "failure:2"
  22.     end
  23.   end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment