get mediafire link after upload file using api

Discussion in 'Programming' started by 24dl, Jan 4, 2014.

  1. #1
    hi i try to get file link after upload afile using mediafire api

    
    $appId ="";
    $apiKey ="";
    $email ="";
    $password ="";
    include("../mflib.php");
    $mflib =new mflib($appId, $apiKey);
    $mflib->email = $email;
    $mflib->password = $password;
    $sessionToken = $mflib->userGetSessionToken();
    $uploadKey = $mflib->fileUpload($sessionToken,"500px-PHP.png");
    $mp3=$mflib->fileGetLinks($quickkey,'direct_download',$sessionToken);
    PHP:
    but give me error

    Error - Get file links : "Invalid parameter 'quickkey' specified" (0)

    the file is already uploaded but i can't get the link

    i trying to get the $quickkey

    what the right way to get it .pls
     
    24dl, Jan 4, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    PoPSiCLe, Jan 4, 2014 IP
  3. 24dl

    24dl Greenhorn

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    http://www.mediafire.com/download/ft8gk3iuqyv5u6w/0000000.zip

    this is mediafire link (ft8gk3iuqyv5u6w) this the quickkey mediafire genrate it after upload file

    u can check function copy or move

    or test the code above to see if it give you link for file


    this the rest of file
    $mp3=$mflib->fileGetLinks($quickkey,'',$sessionToken);
    $mp38=$mp3["links"][0]["direct_download"];
    $mp37=$mp3["links"][0]["one_time_download"];
    $mp39=$mp3["links"][0]["normal_download"];
    PHP:
    thank you
     
    24dl, Jan 4, 2014 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    I don't have a mediafire account, and I can't be bothered creating one, but the $quickkey in the fileGetLinks()-function needs to be set by you - it's not provided by the fileGetLinks-function itself - it's just providing the direct download link given the quickkey - hence, you need to provide the function with the quickkey that the upload gives you - how to do that, you'll have to figure out yourself - it's probably in the documentation somewhere.
     
    PoPSiCLe, Jan 5, 2014 IP