Tnx. Can you tell me what's the simplest way to do this...
I send some data to my PHP script, it calculates some data and outputs
String ABC123 on a screen (with PHP echo function). Then how can I
grab it and receive into my Android activity? Do I need to use JSON
No, you just download the webpage as usual, it will contain the information
you echoed. You form the webpage URL as a normal browser-like URL with
parameters you want to send to your PHP script.
Best regards,
Filip Havlicek
2010/9/4 svebee sven.kapud...@gmail.com
Tnx. Can you tell me what's
Something like -
http://www.anddev.org/novice-tutorials-f8/doing-http-post-with-the-current-sdk-t5911.html
?
Just one thing isn't clear to me - what represents this line
nameValuePairs.add(new BasicNameValuePair(id, 12345));
- especially (id, 12345) - I think that id is the key and
12345 the
I was LITERALLY just coding this to submit a POST to google app
engine.
This code works for me (1.6 compatible.. and probably 1.5 actually):
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(https://someurl.com;);
oops.. just read your previous post
Then how can I grab it and receive into my Android activity?
The line in the code I posted:
client.execute(post);
actually also returns a response:
HttpResponse res = client.execute(post);
So if your PHP script is printing out data to the http response on
5 matches
Mail list logo