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}