4

I want to use "Rapidshare" api for my website, and I have the problem. My problem is that I have multiple rapidshare premium accounts.I have read the information that if i want to use rapidshare api I must create cookies, without it I can't download,upload... files. Is this a correct information and if it is than how can i use rapidshare api with several premium accounts? can i just create these cookies in different folder and than do something, or handle it without creating cookies with php curl?

Volter
  • 173
  • 2
  • 4
  • 12

1 Answers1

12

I'm not familiar with rapidshare api, but I suppose it means that cookies are set up client side. If you need to let the server perform the action, you may 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
}
jabbany
  • 539
  • 1
  • 5
  • 10
  • 1
    so it means that i must learn function "curl_setopt" and this function will fix the problem, Thank you very much for answer! :) – Volter Jul 19 '11 at 15:51