Questions about getting cookies from another website

Source: Internet
Author: User
There are currently two websites A and B (with different domain names) about how the site obtains cookies from another site. after logging on to the & nbsp; A website, A cookie is saved, & nbsp; in this case, website B wants to obtain the cookie value if it wants to know which user of website A has logged on. & Nbsp; how can I obtain the cookie of another website through cur?
Currently, website A and website B (with different domain names) store A cookie after website A logs on. Website B wants to know which user of website A has logged on, that is, you want to obtain the cookie value.

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

$. Get ('sitea _ api. php? Salt = Verification Key & time = current timestamp ', function (){
// Perform the 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.