Interface with running applications in PHP?

I would like to know if there is a way to communicate with a running console program (preferably running on Linux / Debian) via PHP. I'm currently trying to create a web interface for a small (existing) console of a Java program, and I have no idea if there is a way to do this. Can I “enter” a piece of code, say, a remote control module, and then use it for a “remote control” script through PHP? (It would be great if the existing .jar file was not modified / just injection, without reprogramming)

I am grateful for every advice!

+3
source share
2 answers

, . , , , .

(daemon), loopback CURL PHP.

(PHP , Java ) .

- ​​ , PHP Java MySQL (Java JDBC).

, , , // , system() PHP.

+3

Java , , :

$output = system( "java com.yourcompany.package.RunnableClass" ); 
print $output;

, , PHP, Java, JAR.

. ( - ). , . , Java, . , .

, , , Java-, . - PHP. , , , - , - , .

+1

All Articles