Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ShadOS Download
- local url
- local filename
- local tArgs = { ... }
- url = tArgs[1]
- filelocation = tArgs[2]
- local response = http.get(
- "http://pastebin.com/raw.php?i="..textutils.urlEncode(url)
- )
- if response then
- print( "Connected, downloading." )
- local sResponse = response.readAll()
- response.close()
- local file = fs.open(filelocation, "w" )
- file.write( sResponse )
- file.close()
- print( "Downloaded as "..filelocation )
- else
- print( "Failed." )
- end
Add Comment
Please, Sign In to add comment