Advertisement
guitarplayer616

websiteRequest

Jun 23rd, 2015
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. shell.run("clr")
  2. write("I'm feeling lucky > ")
  3. local website = read()
  4.  
  5. if website:sub(1,4) ~= "http" then
  6.     website = "http://"..website
  7. end
  8.  
  9. local server = http.post(website)
  10.  
  11. local res = server.readAll()
  12. server.close()
  13. local h = fs.open("response",'w')
  14. h.write(res)
  15. h.close()
  16. shell.run("edit response")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement