Php curl multiple cookies

I want to use the api for Rapidshare for my website and I have a problem. My problem is that I have several rapidshare premium accounts. I read the information that if I want to use rapidshare api, I have to create cookies, without it I can’t upload, upload ... files. This is the correct information, and if so, how can I use rapidshare api with multiple premium accounts? can I just create these cookies in a different folder and do something or process something without creating cookies with php curl?

+4
source share
1 answer

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{ //similar with other accounts } 
+11
source

All Articles