Jump to content




PHP Code With Computercraft?


  • You cannot reply to this topic
5 replies to this topic

#1 elfin8er

  • Members
  • 133 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.

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 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.

#3 zekesonxx

  • Signature Abuser
  • 263 posts
  • LocationWhere 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.

#4 snoble2022

  • Members
  • 100 posts
  • LocationSomewhere 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

#5 1lann

  • Members
  • 516 posts
  • LocationSeattle

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.

#6 snoble2022

  • Members
  • 100 posts
  • LocationSomewhere 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.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users