I was just wondering if it's possible to run php code via computercraft, either directly in CC, or a php script that I have on my web server.
PHP Code With Computercraft?
Started by elfin8er, Dec 08 2012 09:11 AM
5 replies to this topic
#1
Posted 08 December 2012 - 09:11 AM
#2
Posted 08 December 2012 - 09:14 AM
You could write a PHP interpreter in lua (or find one and adapt it), or serve the page and interpret the results using lua.
#3
Posted 09 December 2012 - 07:04 AM
Why would you want to? It seems a lot to adapt a advanced language so that you can program a couple CC scripts in a familiar language.
#4
Posted 09 December 2012 - 08:52 PM
I agree with him. If this is what you want to do then don't. Its pointless. However, if you're doing this for a pastebin, github, or dropbox host, just using regular lua code works. Php is a complicated language compared to lua anyways. Hope this helps
#5
Posted 09 December 2012 - 09:58 PM
@The 2 people above
You know, using PHP on a webserver can do ALOT more than lua in CC.
@The op
CC allows you to use the http get and post protocols. Which means you can use cc to send requests to a php script on a webserver and for the webserver to respond back.
You know, using PHP on a webserver can do ALOT more than lua in CC.
@The op
CC allows you to use the http get and post protocols. Which means you can use cc to send requests to a php script on a webserver and for the webserver to respond back.
#6
Posted 10 December 2012 - 08:40 AM
I meant if you're using a service like github. You can just post the lua language instead of php in the file.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











