NeoGriever

Untitled

Mar 29th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. function getTimestamp()
  2. http.request('http://neogriever.atwebpages.com/time.php')
  3. local requesting = true
  4. while requesting do
  5. local event, url, sourceText = os.pullEvent()
  6. if event == 'http_success' then
  7. local responseText = sourceText.readAll()
  8. sourceText.close()
  9. requesting = false
  10. return(responseText)
  11. elseif event == 'http_failure' then
  12. requesting = false
  13. print('fail')
  14. return(nil)
  15. end
  16. end
  17. end
Add Comment
Please, Sign In to add comment