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

Http

Started by svdragster, 29 March 2013 - 11:03 PM
svdragster #1
Posted 30 March 2013 - 12:03 AM
Hey,

I already looked for some tutorials and the wiki, but couldn't find any.

How can I use the http.post API with PHP (I'm currently learning php so I won't know everything)?
I want to upload data from a computer.
Mads #2
Posted 30 March 2013 - 12:13 AM
http://computercraft.../wiki/HTTP_(API)
svdragster #3
Posted 30 March 2013 - 12:15 AM
Doesn't help me in any way. :(/>
LBPHacker #4
Posted 30 March 2013 - 02:07 AM
http.post("http://yourpage.com", "var1=cat&var2=bench")

In PHP, you can get var1 and var2 (in _POST array) like this:
echo $_POST["var1"];
echo $_POST["var2"];


If you want to put the variables into $_GET, use http like this:
http.get("http://yourpage.com?var1=cat&var2=bench")
Cranium #5
Posted 30 March 2013 - 02:12 AM
Locked upon request.