views:

112

answers:

5

One possible solution could be simple HTTP get or post request, but that wouldn't be secure.

+2  A: 

You can integrate Java and PHP with PHP-modules; http://php.net/manual/en/book.java.php

(Given that they are on the same machine)

Björn
+1  A: 

Maybe we need some more information about your problem.

One possible solution is Zend Java Bridge (http://files.zend.com/help/Zend-Server-Community-Edition/zendjbridge.html).

If PHP and Java are in different machines, please let us know why web services are not a good solution. In that case, Java RMI in combination with Zend Java Bridge would be useful.

Sinuhe
PHP and Java are not in same server, web services would be overkill...
newbie
+1  A: 

One possible solution could be simple HTTP get or post request, but that wouldn't be secure.

Why not? Do it over HTTPS and have the web service only accept connections from known IPs or via specific API keys. If a HTTPS POST request is acceptable for processing credit cards (it is), it's good enough for your app.

ceejayoz
A: 

An http*s* post connection would be secure. There are many ways to affect the authentication, but this is the basic idea behind the REST concept.

This is commonly done in credit cards, as well as Amazon web service and others. You can look at those for ideas.

Yishai
A: 

One possible solution could be simple HTTP get or post request, but that wouldn't be secure.

What do you base this premise on?

If both ends are on an internal network, it's perfectly safe.

troelskn
Assuming every user with access to the internal network is trustworthy, that is. HTTPS might be a better bet.
ceejayoz
Depends. For most setups, restricting access in a firewall is probably just fine. If you can't trust the infrastructure, ssl might be an option, but I would try to solve it architecturally first.
troelskn