Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Server to pull time from
- http.request("http://mc.ov-gaming.com:25566")
- local requesting = true
- while requesting do
- local event, url, sourceText = os.pullEvent()
- if event == "http_success" then
- local respondedText = sourceText.readAll()
- sourceText.close()
- --Print the reply if successful; debug info for now
- print("Reply was: " .. respondedText)
- requesting = false
- elseif event == "http_failure" then
- print("Server didn't respond.")
- requesting = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment