PHP: Remote Function Call and returning the result?

前端 未结 3 1646
轻奢々
轻奢々 2020-12-03 22:58

I\'m not very expert to PHP. I want to know how to communicate between 2 web servers. For clearance, (from 1st Server) run a function (querying) on remote server. And return

3条回答
  •  粉色の甜心
    2020-12-03 23:35

    What you are aiming to do is definitely possible. You will need to set up some sort of api in order for server one to make a request to server 2.

    I suggest you read up on SOAP and REST api

    http://www.netmagazine.com/tutorials/make-your-own-soap-api

    Generally you will use something like CURL to contact server 2 from server 1.

    Google curl and you should quickly get idea.

    Its not going to be easy to give you a complete solution so I hope this nudge in the right direction is helpful.

提交回复
热议问题