Advertisement
Esbenmine

Web Server

Jul 26th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. --Made by Esbenmine
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. Start = true
  5. InternetID = 1       --Internet ID
  6. rednet.open("top")
  7. if not fs.exists("Website") then
  8.   local website = fs.open("Website", "w")
  9.   website.close()
  10. end  
  11. local website = fs.open("Website", "r")
  12. local Website = website.readAll()
  13. website.close()
  14. repeat
  15.   id, CID = rednet.receive()
  16.   if id == InternetID then
  17.     print("ID: ",CID, " Connected to the website")
  18.     rednet.send(CID, Website)
  19.   end
  20. until Start == false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement