Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tablename = {}
- local website = "http://example.com"
- local req = http.get(website)
- local reqbefore = req -- For making the counter be able to reset
- if not req then
- error("Request Failed!")
- end
- local lines = 0
- while req.readLine() do
- lines = lines + 1
- end
- req.close()
- local req = reqbefore
- local counter = 0
- while not counter == lines do
- local line = req.readLine()
- table.insert(tablename, line)
- end
- req.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement