NeoGriever

Untitled

Mar 29th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 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. print(responseText)
  10. requesting = false
  11. elseif event == 'http_failure' then
  12. print('fehlschlag')
  13. requesting = false
  14. end
  15. end
  16. end
Add Comment
Please, Sign In to add comment