Questions about getting cookies from another website-php Tutorial

Source: Internet
Author: User
There are currently two websites, website A and website B (with different domain names), with regard to the issue of obtaining cookies from another website. after website A logs on, it will save A cookie, at this time, website B wants to know which user of site A has logged on, that is, to obtain the cookie value.

Is there any way to implement it through curl? Or use other methods instead of curl.


Reply to discussion (solution)

Website A has an interface, so it's okay for website B to directly read the interface... can it be done on the client?

If website A is an interface, it's okay for website B to directly read the interface... can you get the client to do it? can you tell me more?

Siteb. js

$. Get ('sitea _ api. php? Salt = Verification Key & time = current timestamp ', function () {// execute logon operation });


Sitea_api.php
If (mycheck ($ salt) {// check whether the key is correct echo $ uid; // output the current user ID}

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.