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.

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

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效