Issues related to cross-domain value transfer

Source: Internet
Author: User
About cross-domain value-transfer issues
Now there's a page and B page (on different servers),
A page needs to get the value of page B through and insert the database into page A: file_get_contents (b.html)
This is a one-dimensional array returned by the B-page, but based on the file_get_contents feature or read as a string back to page A,
So the question now is how the array-like string from the B-page gets converted into a real array?


------Solution--------------------
What is the format of the b.html array?
If it can be set, the serialized b.html array is a string. Reference serialize () function
------Solution--------------------
PHP Code
$s =<<< Txtarray (    [1] + = the first    [2] and the second    [3] and the third) Txt;preg_match_all ('/\[(\w+) \] = (. +) $/m ', $s, $r); $ar = Array_combine ($r [1], $r [2]);
  • 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.