Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/239.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在外部网站中使用的搜索api_Php_Ajax_Api_Search - Fatal编程技术网

Php 在外部网站中使用的搜索api

Php 在外部网站中使用的搜索api,php,ajax,api,search,Php,Ajax,Api,Search,我是api开发新手,所以不知道这是否可行 我有一个网站(http://www.mysite.com/),它由数据组成,我需要开发一个api或以某种方式使用此网站的数据在其他网站中使用它 我的要求是其他外部网站(http://www.externalwebsites.com)需要从我的主站点搜索数据(http://www.mysite.com/)http://www.externalwebsites.com/将向http://www.mysite.com/它将返回结果并在http://www.ex

我是api开发新手,所以不知道这是否可行

我有一个网站(
http://www.mysite.com/
),它由数据组成,我需要开发一个api或以某种方式使用此网站的数据在其他网站中使用它

我的要求是其他外部网站(
http://www.externalwebsites.com
)需要从我的主站点搜索数据(
http://www.mysite.com/
)<代码>http://www.externalwebsites.com/将向
http://www.mysite.com/
它将返回结果并在
http://www.externalwebsites.com/

我需要在
http://www.externalwebsites.com/
用于搜索数据,所以我的问题是

  • 整个过程可行吗

  • 当然,您可以使用JSONP,jQuery之类的库默认支持JSONP


    一个好方法是使用SOAP web服务:

    休息: 肥皂:
    oAuth:(Facebook、Google、Yahoo、Twitter等流行网站都使用此功能)

    SOAP涵盖了大量边缘案例。它通常比大多数人需要的任何东西都要复杂得多。JSON或简单的基于XML的RESTful API通常是更好的选择。