ubu Posted April 18, 2007 Share Posted April 18, 2007 hello, is it possible to write a java program and while its running to send a command to it from a php script ? for instance.. a program that in a loop simply prints all args received.. can you give me an example ? thank you! Link to comment https://forums.phpfreaks.com/topic/47607-sending-commands-to-a-java-program/ Share on other sites More sharing options...
genericnumber1 Posted April 18, 2007 Share Posted April 18, 2007 It is possible to integrate php into a java servlet environment... Here's some info on it... http://php.net/java I couldn't answer any specific questions though as I haven't looked into it myself. Link to comment https://forums.phpfreaks.com/topic/47607-sending-commands-to-a-java-program/#findComment-232441 Share on other sites More sharing options...
ubu Posted April 18, 2007 Author Share Posted April 18, 2007 sorry, i think i didnt make myself clear. i dont wanna use servlets; lets say that we have a java program running on a server, and we have a php script containing a form. when subscribing, data is passed to the java program..(in fact, it could be a c++ program too) from now, it doesnt matter what the program uses the submitted data for; firstly, i wanna know how to send args to a running app; then, the other side..how to receive them; Link to comment https://forums.phpfreaks.com/topic/47607-sending-commands-to-a-java-program/#findComment-232465 Share on other sites More sharing options...
genericnumber1 Posted April 18, 2007 Share Posted April 18, 2007 http://www.php.net/manual/en/ref.exec.php? Link to comment https://forums.phpfreaks.com/topic/47607-sending-commands-to-a-java-program/#findComment-232656 Share on other sites More sharing options...
trq Posted April 18, 2007 Share Posted April 18, 2007 firstly, i wanna know how to send args to a running app; Use sockets to send the data to a specific port. then, the other side..how to receive them; Has nothing to do with PHP but you'll basically need to make the application listen on a specific port. (Also, using sockets). Link to comment https://forums.phpfreaks.com/topic/47607-sending-commands-to-a-java-program/#findComment-232669 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.