Joseph
Joseph

Reputation: 2736

Post from PHP page to Java program and output result

I have a PHP page on one server, which asks for some login details from a user.

I then have a Java application on another server.

I am trying to POST the results from the login form to the Java application, then respond with a yes/no as to whether the details were correct.

Whats the simplest way of going about this? I have read plenty on using sockets to post from Java, not I can't seem to find a good tutorial that explains how to post from a form, process it and return the results pack to the user.

Upvotes: 0

Views: 99

Answers (2)

Peter Perháč
Peter Perháč

Reputation: 20792

Change the form that posts to PHP to post to your Java application. If that workaround is acceptable in your situation. Definitely simpler than implementing web services - but otherwise I am afraid you will have to go for WS if you just can't change the url of the form's action

Upvotes: 0

ranko85gmx
ranko85gmx

Reputation: 82

The best way is to use web services. Implement a web service on Java application and call him from another application.

Best Regards.

Upvotes: 2

Related Questions