Since you have a wildcard cookie, dev2 will also have the same cookies as dev1. So basically you should say: "Transfer my cookies to another server via curl.
The curl parameter you want is "CURLOPT_COOKIE" and you pass the cookie string "name1 = value1; name2 = value2"
Putting it together (untested - you need, of course, to wrap this among other curl functions)
$cookiesStringToPass = ''; foreach ($_COOKIE as $name=>$value) { if ($cookiesStringToPass) { $cookiesStringToPass .= ';'; } $cookiesStringToPass .= $name . '=' . addslashes($value); } curl_setopt ($ch, CURLOPT_COOKIE, $cookiesStringToPass );
source share