dongliaojing0554 2011-08-27 01:33
浏览 70
已采纳

肯定地从java HttpClient中识别http请求

I am building an Android app that communicates with a remote server to get data. How can I use PHP to positively identify a request coming from an HttpClient Android app?

One might think to use $_SERVER['HTTP_USER_AGENT'], but that can be easily spoofed.

Any suggestions?

  • 写回答

1条回答 默认 最新

  • douzhi7070 2011-08-27 01:41
    关注

    The Android Developers Blog has an in depth posting on identifying applications: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html

    The basic idea is to have the Android app generate a unique identifier when it is installed. You can pass that to the server when making requests. In your case, it might not need to be unique on a per installation basis though.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 swiftui @query 报错
  • ¥50 怎么解决刷卡或扫码后,点击软件输入框,win10屏幕键盘不会自动弹出的问题
  • ¥15 如何使用arcgispro的训练深度模型,发现water和nowater精度为0?(相关搜索:深度学习)
  • ¥20 matlab作业不太懂呀有问题能给个代码吗
  • ¥15 自制电路图为何无法驱动ESP01S?
  • ¥15 前端加access数据库
  • ¥15 ARCGIS 多值提取到点 ERROR 999999
  • ¥15 mysql异常断电, [MY-011971] [InnoDB]
  • ¥15 uni.onBluetoothDeviceFound熄屏不运行
  • ¥15 求PHDA糖尿病并发症数据集,有偿