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
}