Possible Duplicate:
How can I communicate between PHP and a Java program?
I’m currently writing a web service which needs to handle events in real time.
So I thought it would be a nice approach to write a java program which runs in the background and handles all the events.
So the frontend of the web application is written in PHP. The user creates a new event and what I want is, that that PHP script notifies the running java process about that event. Is this possible?
You can directly send web service request from your PHP code to your Java application by making it a web service provider.
Other then web services there are couple of more alternatives:
Also here is a good tutorial on integrating Java with PHP using Thrift