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

just a quick question

Started by SpencerBeige, 11 June 2015 - 06:50 PM
SpencerBeige #1
Posted 11 June 2015 - 08:50 PM
im not looking for any code, but just as an example, how would you connect a website to a program? e.g. making online accounts show up in cc
biggest yikes #2
Posted 11 June 2015 - 09:01 PM
Depends on what you mean by "website". If you mean your own personal website, you may want to see How to create a MySQL Database Login by DannySMc (as for making online accounts). If you mean connect to a website already made (for example, a website like Twitter with a login api), the website may have an API that you can send and get HTTP requests from.
"Connecting a website to a program" would be as simple as sending an HTTP request to a website, which handles the request and sends it back. If you have a website, try using PHP to handle the request on the server side.
MKlegoman357 #3
Posted 11 June 2015 - 09:01 PM
You would use CC's HTTP API. It is capable of sending GET and POST request, together with custom request headers. Although it is not possible to read response headers. The server can be any server that can accept HTTP requests.