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.

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

报告相同问题?

悬赏问题

  • ¥15 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)