I would like to send data from a php script to a java desktop application. The php data is retrieved from a database in a SELECT * FROM xxxxx. I would like to pass these values to java for displaying.
I know I can receive data from php in java through the following statement
String buffer;
in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
while((buffer = in.readLine()) != null){
System.out.println(buffer);
}
However what if I want to capture specific values like firstname , lastname, age, occupation etc etc. How can I do that in java not android.
Any help would be much appreciated!
jsonto encode response fromphp serverand decode it in yourjava code