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

Real FTP transfer within ComputerCraft

Started by DaKodiMaster, 29 December 2015 - 02:14 PM
DaKodiMaster #1
Posted 29 December 2015 - 03:14 PM
Does anyone know how I could use the http.post() method to upload a file to my own web server?
I know it would have to use interactions with PHP and ComputerCraft, but I have never been able to do that.
KingofGamesYami #2
Posted 29 December 2015 - 03:24 PM
First, learn PHP. Next, set up an SQL server and open a port on your computer. If you want to use this from places other than your single player worlds, you'll likely need to get a domain name for it. Now, set up your PHP script to communicate to your SQL server when it receives a POST Request, and set up your SQL server to save the information it was sent from the PHP script. After all of that, you'll need to set up your PHP & SQL server for retrieval of said file.

https://www.codecademy.com/learn/php

http://dev.mysql.com/doc/refman/5.7/en/database-use.html
DaKodiMaster #3
Posted 29 December 2015 - 03:28 PM
Thanks! That helped!
kolsto #4
Posted 29 December 2015 - 07:39 PM
Is there easier way to achieve this?)
Dragon53535 #5
Posted 29 December 2015 - 08:22 PM
Probably not, it's web design basically, html, php, sql, none of those are easy.