【发布时间】:2012-08-11 22:36:11
【问题描述】:
从我的 android 应用程序中,我想调用 php 网络服务。有时,我只需要一些来自 php 的数据,有时会根据传递的一些参数获取数据。我更喜欢使用像 HttpClient 这样的 RAW Api。我也打算用mySql DB。
为了调用 php web 服务,我得到了来自http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/、http://www.anddev.org/doing_http_post_with_android-t492.html、http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/ 的引用
我被困在: 例如:我用我的 url “http://......php?src=SOURCE&dest=DEST”传递了 2 个参数 REsult - 从 SOURCE 到 DEST 的方向(有时结果可能是字符串、项目等的数组)
- 如何在单个请求中发送和接收数据?
- 相同的php怎么写?
- 是否需要使用原始 API 或 JSon 或 ksoap 完成上述操作?我已经读过,而不是使用 Jsoan 或 Soap,raw 是最好的方法。
请帮助我解决困惑并继续使用该应用程序。 非常感谢任何帮助。
谢谢
【问题讨论】:
-
我昨天刚刚重播the same question :)
标签: php android web-services