132 posts
Posted 08 December 2012 - 09:11 AM
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.
8543 posts
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.
264 posts
Location
Where you aren't
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.
95 posts
Location
Somewhere near the local computer store?
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
515 posts
Location
Australia
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.
95 posts
Location
Somewhere near the local computer store?
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.