doz97171 2012-10-02 00:51
浏览 14

库为PHP消费编写PHP Web服务[重复]

Possible Duplicate:
Framework for providing API access to website?

I need to write a service in PHP. The server will be used by android/iphone clients through the url for example like this

http://www.myservice.com/query.php?param1=a&param2=2...
  • The server will return data back
  • The client will push data to server
  • There can be large num of clients simultaneously accessing so the performance is key

I want to use the data format that is easily understood by my android client. In other words, I do not want to reinvent the wheel and create my own format and parsing, instead I would prefer to use any library if it exists. Is there a framework that I can use to abstract the communication mechanism for data get and push ?

Thanks, Ahmed

  • 写回答

3条回答 默认 最新

  • doushang1778 2012-10-02 01:00
    关注

    well, Use mvc framework(yii, ci, ...) and from controller directly print json_encode($object).

    It will return json data to browser, and consume it anywhere(compuer, droid, iphone, ... , iron :D). the solution is json. just share object in json format, so anyone can map it into it's preferred obejct

    here is something something you may have a look

    评论

报告相同问题?

悬赏问题

  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错