In addition to database storage, how can I deal with PHP remote connection?

Source: Internet
Author: User
PHP remote connection in addition to database storage, what are the prerequisites: PHP website. Website A generates A data aaaa, and website B needs to receive aaaa. in addition to database implementation, is there any convenient method? Regardless of security, how can I get data aaaa from website B ., Deploy webservice or simple xmlrpc, or get an api to return json-like js code (which can be used for js to call jsonp for PHP to remotely connect to the database for storage, what else can be done?
Prerequisite: PHP website.
Website A generates A data aaaa, and website B needs to receive aaaa. in addition to database implementation, is there any convenient method?
Regardless of security, how can I get data aaaa from website B.

------ Solution --------------------
Deploy webservice or simple xmlrpc, or get an api to return json-like js code (which can be called by js for jsonp)
------ Solution --------------------
A is sent through get and post.
Or
B. use the file function
------ Solution --------------------
Push past
------ Solution --------------------
Discussion

Reference:

A is sent through get and post.
Or
B. use the file function


Give me a code example get post

------ Solution --------------------
Memcache...
------ Solution --------------------
Discussion
Memcache...

------ Solution --------------------
Discussion

Reference:
Memcache...


Or ftp?

------ Solution --------------------
Generally, get and post are the most feasible methods for transferring information between pages of a site, that is, the so-called interface design.
A generates data B receives data
So A only needs to use curl http: // B/interface. php? Content = XXXX
B, you only need $ _ GET ['content']. of course, this is only the simplest case. security, encoding, and other issues are not considered.
------ Solution --------------------
C # code
Help top...
------ Solution --------------------
1: curl remotely obtains the connection address.
2: ajax loads a page to obtain the value. Json

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.