Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 516195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:42:22+00:00 2026-05-13T07:42:22+00:00

I’m new with this API thing, so I don’t know how to use it

  • 0

I’m new with this API thing, so I don’t know how to use it very well. I want to make an application on C or PHP or AppleScript to check if a file is downloadable. I just need to know how to send the request properly.

I read the API docs but I still don’t know how to get the return values.

Can anyone help me?

Happy holidays everyone =)
since now thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:42:23+00:00Added an answer on May 13, 2026 at 7:42 am

    Use something like:

    http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles_v1&type=prem&login=MY_USERNAME&
    password=MY_PASSWORD&files=5044438&filenames=test1.rar
    

    This call makes use of the checkfiles_v1 subroutine which according to the API documentation:

    subroutine=checkfiles_v1
    Description:    Gets status details about a list of given files. (files parameter limited to 3000 bytes. filenames parameter limited to 30000 bytes.)
    Parameters:  files=comma separated list of file ids
                 filenames=comma separated list of the respective filename. Example: files=50444381,50444382 filenames=test1.rar,test2.rar
                    incmd5=if set to 1, field 7 is the hex-md5 of the file. This will double your points! If not given, all md5 values will be 0
    Reply fields:
            1:File ID
            2:Filename
            3:Size (in bytes. If size is 0, this file does not exist.)
            4:Server ID
            5:Status integer, which can have the following numeric values:
                0=File not found
                1=File OK (Anonymous downloading)
                2=File OK (TrafficShare direct download without any logging)
                3=Server down
                4=File marked as illegal
                5=Anonymous file locked, because it has more than 10 downloads already
                6=File OK (TrafficShare direct download with enabled logging. Read our privacy policy to see what is logged.)
            6:Short host (Use the short host to get the best download mirror: http://rs$serverid$shorthost.rapidshare.com/files/$fileid/$filename)
            7:md5 (See parameter incmd5 in parameter description above.)
    Reply format:   integer,string,integer,integer,integer,string,string
    

    You can make use of the Status from the reply and if its value is 1 it means the file is downloadable.

    Here goes the program in PHP:

    Click here to see the server reply

    <?php
    
    // This PHP script check if a file is publicly downloadable
    // I've taken a sample file: 
    // http://rapidshare.com/files/293360186/1597494240.pdf
    // which at the time of wring is available + is downloadable.
    
    // File ID
    $file_id = '293360186';
    
    // Filename
    $file_name = '1597494240.pdf';
    
    //construct the URL.
    $URL = "http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles_v1&files=$file_id&filenames=$file_name";
    
    // Now get the response for this URL.
    /* It looks something like:
       293360186,1597494240.pdf,6861070,59,1,gc,0 
    
       So we are just interested in field 5(Status), check if its 1(file downloadable) or 0
    */
    
    $reply = file_get_contents($URL);
    if(!$reply)
    {
        die("Failed for $URL<br>");
    }
    
    $arr = explode(',',$reply);
    
    if($arr[4] == 1)
        print "File $file_name is publicly downloadable<br>";
    else
        print "File $file_name is not publicly downloadable<br>";
    
    ?>
    

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.