rapidshare

cURL not following the Location: header

一曲冷凌霜 提交于 2020-01-15 10:44:23
问题 I'm trying to use Rapidshare's API to download a file. To do so, I need to request their download subroutine twice. Once to get the appropriate download server to use, and secondly to request the download again on the server that the first request gave me. The second call is what sends the file. On the first call, it returns a header with a Location: blah field, and I need to follow this location. So I did this: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://api.rapidshare.com/cgi

cURL not following the Location: header

馋奶兔 提交于 2020-01-15 10:43:11
问题 I'm trying to use Rapidshare's API to download a file. To do so, I need to request their download subroutine twice. Once to get the appropriate download server to use, and secondly to request the download again on the server that the first request gave me. The second call is what sends the file. On the first call, it returns a header with a Location: blah field, and I need to follow this location. So I did this: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://api.rapidshare.com/cgi

cURL not following the Location: header

旧时模样 提交于 2020-01-15 10:42:32
问题 I'm trying to use Rapidshare's API to download a file. To do so, I need to request their download subroutine twice. Once to get the appropriate download server to use, and secondly to request the download again on the server that the first request gave me. The second call is what sends the file. On the first call, it returns a header with a Location: blah field, and I need to follow this location. So I did this: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://api.rapidshare.com/cgi

How to use RapidShare API to get Account Details?

扶醉桌前 提交于 2020-01-06 03:36:10
问题 When I try to use the RapidShare API to get account details, I get a long string like this: accountid=******* type=prem servertime=1247000294 addtime=********** validuntil=********* username=*****8 directstart=1 protectfiles=0 ... How can I get values from it using PHP? To be more specific, how can I set the value of accountid to a variable? For instance $username = VALUE OF ACCOUNTID ? I tried strpos , but I couldn't get it to work. 回答1: If it's just a plain string like what you posted...

Rapidshare API with PowerShell

爱⌒轻易说出口 提交于 2019-12-20 06:39:31
问题 $FreeUploadServer = Invoke-RestMethod -Uri "http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=nextuploadserver" Invoke-RestMethod -Uri "http://rs$FreeUploadServer.rapidshare.com/cgi-bin/rsapi.cgi?sub=upload&login=43533592&password=password&filecontent=C:\libs\test.txt" I have no clue why that isnt working, its something to do with the filecontent parameter but i have read the entire documentation about the API and i cant figure it out. API Documentation 回答1: Make sure you use the -Method Post

Uploading files to RapidShare using PHP and cURL via their API

只谈情不闲聊 提交于 2019-12-13 04:45:34
问题 I'm trying to upload files to RapidShare using their API and PHP with cURL. So far, I've got this code: // Get the RapidShare server to upload to $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=nextuploadserver'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $uploadServer = curl_exec($ch); // Upload the file to RapidShare $url = 'http://rs' . $uploadServer . '.rapidshare.com/cgi-bin/rsapi.cgi?sub=upload';

Rapidshare API with PowerShell

霸气de小男生 提交于 2019-12-02 09:35:55
$FreeUploadServer = Invoke-RestMethod -Uri "http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=nextuploadserver" Invoke-RestMethod -Uri "http://rs$FreeUploadServer.rapidshare.com/cgi-bin/rsapi.cgi?sub=upload&login=43533592&password=password&filecontent=C:\libs\test.txt" I have no clue why that isnt working, its something to do with the filecontent parameter but i have read the entire documentation about the API and i cant figure it out. API Documentation Keith Hill Make sure you use the -Method Post parameter/arg combo on the second Invoke-RestMethod call. Also, take a look at this SO response to