Creating a Javascript Api Interface

前端 未结 4 1546
暖寄归人
暖寄归人 2021-01-17 04:37

I\'m currently working on a solution in php which queries an sql database. However, i want other website to be able to query the database (or the functions in php). I search

相关标签:
4条回答
  • 2021-01-17 05:18

    Sounds to me like you're inadvertently writing a web API. REST is hot these days, for good reason (they play well with javascript clients, for one).

    Here is a thread that should give you lots to chew on.

    0 讨论(0)
  • 2021-01-17 05:21

    you could build a rpc server (remote-procedure-call). It could be either xml-rpc or json-rpc.
    Here are some good documentations

    0 讨论(0)
  • 2021-01-17 05:25

    If Cross-Domain is your only concern, check out JSONP. You can also check the jsonp tag to learn more.

    0 讨论(0)
  • 2021-01-17 05:30

    Try soap or rest.

    If I understood right... if you want other sites to access your Database... Obviously...use jQuery :p to make the calls

    0 讨论(0)
提交回复
热议问题