Why it's not download the file?

Discussion in 'PHP' started by chaoscript, Aug 13, 2011.

  1. #1
    I have site,
    www.Click2Unlock.net,
    When you enter megaupload link, it's need to give download link,
    instead that it's give the file content.

    Please, need help.

    Regards.
     
    chaoscript, Aug 13, 2011 IP
  2. ssmm987

    ssmm987 Member

    Messages:
    180
    Likes Received:
    4
    Best Answers:
    3
    Trophy Points:
    43
    #2
    It looks like something that really needs to be solved by you. Seems there is something wrong in the bot which fetches the links.
     
    ssmm987, Aug 13, 2011 IP
  3. chaoscript

    chaoscript Well-Known Member

    Messages:
    3,459
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    150
    #3
    I don't think so, as in another server it's working great, the same script,
    So I think what miss in my server.

    Regards.
     
    chaoscript, Aug 13, 2011 IP
  4. ssmm987

    ssmm987 Member

    Messages:
    180
    Likes Received:
    4
    Best Answers:
    3
    Trophy Points:
    43
    #4
    Well, there is a big difference in returning the link, or returning the content of the link.
     
    ssmm987, Aug 13, 2011 IP
  5. chaoscript

    chaoscript Well-Known Member

    Messages:
    3,459
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    150
    #5
    I need that the script return the download file,
    not link, it's just give download.

    Regards.
     
    chaoscript, Aug 13, 2011 IP
  6. ssmm987

    ssmm987 Member

    Messages:
    180
    Likes Received:
    4
    Best Answers:
    3
    Trophy Points:
    43
    #6
    ow, I get it now.

    Use the attachment header:
    header('Content-Disposition: attachment; filename="file.ext"');
    Code (markup):
     
    ssmm987, Aug 13, 2011 IP
  7. freelanceinphp

    freelanceinphp Member

    Messages:
    134
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #7
    Header() is a php function to download file to user's system and you can also download thru html anchor tag
    Like, file name is setup.doc then <a href="FILE_PATH/setup.doc" target="_blank">Click here</a>
     
    freelanceinphp, Aug 15, 2011 IP