mjmac85

webreadLUA

Dec 2nd, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --should probably be sExample = http.get(VARIABLENAMEHERE)
  2. --with the variable name passed in
  3. sExample = http.get("http://d20mc.us/testing/ender/lall.php")
  4.  
  5. --data is the table name
  6. data = {}
  7. --this only works for up to 100 lines.  I do not have a good
  8. --method to know the line number or do this dynamically right
  9. --now.
  10. for i=1,100 do
  11.     line = sExample.readLine()
  12.     if line == "exit" then break end
  13.     data[i] = line
  14. --this is a debug line just to show the data
  15.     print(data[i])
  16. end
  17. sExample.close()
Advertisement
Add Comment
Please, Sign In to add comment