I am not familiar with rapidshare api, but I guess that means cookies are set on the client side. If you need to let the server perform an action, you can try this.
curl_setopt($ch, CURLOPT_COOKIE, "CookieName=CookieValue;anotherCookieName=anotherCookieValue");
and add some conditional arguments
if($needToUseAccount1){ curl_setopt($ch, CURLOPT_COOKIE, "cred1=data1;cred1_b=data1_b"); }else{
source share