A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: hph help, downloading a file from another web directory

  1. #1
    Senior Member
    Join Date
    Jun 2002
    Posts
    109

    hph help, downloading a file from another web directory

    Hi, I want a user to be able to download a file from a different directory on the server, that is not part of the website.

    A user pays for the file, once the payment has been processed the system gets the file from a private directory on the server and gives it to the user.

    I did this in ASP once using the "mySmartUpload" package but really need to do it in PHP now.

    Thanks

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    something like
    <?
    $filename = "xxx";
    $fp = fopen("otherdir/$filename", "r");
    header("Content-type: aplication/octet-stream");
    header("Content-disposition: attachment; filename=\"$filename\"");
    fpassthru($fp);
    ?>

    Musicman

  3. #3
    Senior Member
    Join Date
    Jun 2002
    Posts
    109

    yeeeey

    cheers Musicman!! thats exactly what i was after

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center