How do you use http.post() to send data to a server? Basically, I have a PHP script that will interact with a database depending on the data it's given; how do I give it data?
2 replies to this topic
#1
Posted 13 December 2015 - 06:26 AM
#2
Posted 13 December 2015 - 06:49 AM
http.post("yoursite.com", "postdata=whatever&morepostdata=blahblah")
... is pretty much the same as sticking this into your web browser's address bar:
yoursite.com?postdata=whatever&morepostdata=blahblah
Keep textutils.urlEncode() in mind, and see the pastebin script's source a more thorough example.
#3
Posted 13 December 2015 - 07:01 AM
So, "$_POST['oper']" being set to a value would be:
Right?
http.post("minerobbercc.x10host.com/cc-scripts/sm-suite.php", "oper=blah")
Right?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











