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
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";);
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
"1
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
> Tnx. Can you tell me what's the simplest way to do
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
(http://snipplr.com/view/4717
5 matches
Mail list logo