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

Posting data to an SQL database

Started by RabidToast, 02 October 2012 - 09:08 PM
RabidToast #1
Posted 02 October 2012 - 11:08 PM
So… I don't really have any experience with SQL, HTTP or anything along those lines. All I want to know is if there is any possible way to use the http api to save data in an SQL database. I am aware that if possible, this would open up all sorts of security threats, but I would still like to know.
chiloxsan #2
Posted 03 October 2012 - 02:01 AM
You cannot access SQL databases directly since they use a different protocol than HTTP. Although you can set up a PHP script that does have access to the database on a webserver to act as a gateway.
hego555 #3
Posted 04 October 2012 - 07:19 AM
I set up a whole money system through the HTTP API and SQL

But there is a man in the middle, or code in the middle if you will…

Its simple

Make a PHP site to handle all the quary's… feed it info with HTTP API and GET