Advertisement
ComputerMan123

test

Oct 12th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. local tablename = {}
  2. local website = "http://example.com"
  3. local req = http.get(website)
  4. local reqbefore = req -- For making the counter be able to reset
  5. if not req then
  6. error("Request Failed!")
  7. end
  8. local lines = 0
  9. while req.readLine() do
  10. lines = lines + 1
  11. end
  12. req.close()
  13. local req = reqbefore
  14. local counter = 0
  15. while not counter == lines do
  16. local line = req.readLine()
  17. table.insert(tablename, line)
  18. end
  19. req.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement