I want to know if it's possible to have an applet communicate with a PHP site and retrieve some information. If so, what approaches can be used?
Asked
Active
Viewed 712 times
3 Answers
1
Your applet could do some URLConnections or HTTPConnections and get the raw text returned by the PHP url.
String myUrl = "http://mysite.com/service.php?param1=yay";
Then use the example How do you Programmatically Download a Webpage in Java to get the text.
1
Read the PHP page in JAVA Applet, and use JSON/XML format to send data from PHP to Java applet. JSON or XML would make it easier for you to handle the data.

DhruvPathak
- 42,059
- 16
- 116
- 175
0
Even if you are going to use the HTTP for sending and receiving data, then you can't make it pretty sure, because user has always access to it.

Risto Novik
- 8,199
- 9
- 50
- 66