-3

I have to send two strings from java android code to php script.

I just want from java to send name1, and name2, and to read this names in php scripts.

How to do this?

2
  • 1
    You would need to provide more details about what you are trying to do. From the Android tag, I guess you are using Java from the Android platform and need to communicate with PHP on the server side. If this is the case, using an HTTP request is the most natural thing to do. Commented Oct 4, 2011 at 12:48
  • 1
    Where is your PHP script? Behind a web server? HTTP client is the way to go then. If you just "have a PHP script" that you'd like to add to your app, you'd better port it to Java and make it part of your application. Commented Oct 4, 2011 at 12:51

2 Answers 2

3

Short questions get short answers

http://developer.android.com/reference/org/apache/http/client/HttpClient.html

0
0

If you set up your php script to be served by a web server you can have a java http client call the php script and pass the strings as request parameters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.