Advertisement
imring

Untitled

May 29th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. function getTableUsersByUrl(url)
  2.     local n_file, bool, users = os.getenv('TEMP') .. '\\' .. os.time(), false, {}
  3.     downloadUrlToFile(url, n_file)
  4.     while not doesFileExist(n_file) do wait(0) end
  5.     local file = io.open(n_file, 'r')
  6.     if file then
  7.         for w in file:lines() do
  8.             local n, d = w:match('(.*): (.*)')
  9.             users[#users+1] = { name = n, date = d }
  10.         end
  11.         file:close()
  12.         os.remove(n_file)
  13.     end
  14.     return bool, users
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement