2011-08-27 01:33

肯定地从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?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • douzhi7070 douzhi7070 10年前

    The Android Developers Blog has an in depth posting on identifying applications:

    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.

    点赞 评论 复制链接分享