This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Galactica4's profile picture

Advanced Rednet And HTTP--HELP

Started by Galactica4, 11 July 2013 - 12:39 AM
Galactica4 #1
Posted 11 July 2013 - 02:39 AM
Hi I am in the middle (well very start actually) of building an OS and I have a idea and a question and want your opinion on if it could work and is so how?

1. Advanced Rednet (more important/ relevant)
  • So I have an idea to be able to sent files over wireless/ wired rednet and it is to use the chat/message feature to send all the lines of code and the other computer/s to automatically record and input to a file! NO STEALING IDEAS please.
2. HOW DO YOU USE HTTP/PHP?????
  • OK so i have a minor problem, i have absolutely no idea on how to use HTTP or where it is used. I need a comprehensive tutorial, not the mumble that i have been finding. I aim to use this to make something for the OS. (secret) ;)/>/>/>
Thanks (if you help)

I HAVE TRIED SO NO SAYING THAT I HAVEN'T!

P.S If I needed to post a page for an OS that is in first dev phase (alpha 0.01) and has not got a release but just info, where should put it?? QUESTION FOR ADMINS/MODERATORS

Edit: how can you Fetch data from an open computer like a server and is there a way remote control pc's ( from other Pc?) thanks
Zudo #2
Posted 11 July 2013 - 02:48 AM
1: It's been done before, you just need to:
[indent=1]Sender:[/indent]
[indent=1]

modem = peripheral.wrap("left") -- change this
handle = fs.open("filename", "r")
contents = handle.readAll()
modem.transmit(1, 1, contents) -- change 1 to the channel you use
handle.close()
[/indent]
[indent=1]Receiver:[/indent]
[indent=1]

modem = peripheral.wrap("left") -- change this
modem.open(1) -- change this to the same channel as before
replyChannel, message, senderDistance = os.pullEvent("modem_message")
handle = fs.open("filename", "w")
handle.write(message)
handle.close()
[/indent]

2: What do you need to do with it?

P.S: incomplete os topics are not allowed at all
Edited on 11 July 2013 - 12:51 AM
Galactica4 #3
Posted 11 July 2013 - 05:14 AM
1: It's been done before, you just need to:
[indent=1]Sender:[/indent]
[indent=1]

modem = peripheral.wrap("left") -- change this
handle = fs.open("filename", "r")
contents = handle.readAll()
modem.transmit(1, 1, contents) -- change 1 to the channel you use
handle.close()
[/indent]
[indent=1]Receiver:[/indent]
[indent=1]

modem = peripheral.wrap("left") -- change this
modem.open(1) -- change this to the same channel as before
replyChannel, message, senderDistance = os.pullEvent("modem_message")
handle = fs.open("filename", "w")
handle.write(message)
handle.close()
[/indent]

2: What do you need to do with it?

P.S: incomplete os topics are not allowed at all

I want to make a updater and an app that checks for critical files (if the are there) and if not it will replace them as we'll as something to download optional additional files to a directory, I also want to make a web browser like firewoolf.
TNX