Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Anyone know how I can make it so you can only download a file through a php script and not let the user see the real place it's being downloaded from? One example would be what www.mp3.com uses to prevent direct linking of mp3's.

    I'd prefer php, but I'm not sure how it would do it...
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    that's htaccess, not php.

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    There are other posts here on that topic....
    [searchwdf]htaccess[/searchwdf]

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    ermm....

  6. #5
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    As far as I know, htaccess merely allows certain permissions.. when they're downloading they would still get something like http://mydomain.com/mysupersecretfile.mp3 and would be able to share this with others, no?
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  7. #6
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    nevermind, read up on it more... thanks
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  8. #7
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Originally posted by transio
    There are other posts here on that topic....
    [search]htaccess[/search]
    It's either searchwdf or wdfsearch...even I can't remember, which is pretty bad
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  9. #8
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    all done
    JR

  10. #9
    Member Black Vivi's Avatar
    Join Date
    Apr 2003
    Location
    UK
    Posts
    75
    Member #
    1072
    you can protect downloads by storing the file data in a mysql database
    Download Firebird now!

  11. #10
    Junior Member
    Join Date
    Jul 2003
    Location
    New England, USA
    Posts
    6
    Member #
    2120
    masking download

    I did a quick search on google and found a perl script article on sitepoint: My search was "mask url of downloaded file php"

    http://www.sitepoint.com/article/1156 is what I came up with for the first listing.

    Although this tutorial script is written in perl, I've seen a lot of similarities to PHP (albiet I AM a newbie to PHP so take that with a grain of salt).

    I would create a script that will call the file as a variable to the script (as seen in the tutorial).

    Then, when creating the output for your script, start with printing the header information for the type of file you are about to have the user download. Like seen in the link above:

    "print "Content-Type:application/x-download\n";" for an executable.

    This is telling the browser what type of file (MIME type) that is about to be sent to the user's browser to then send off to the specified app on the user's computer.

    Then include the content of the file.

    It sounds like pretty standard stuff - PHP should include both printing and including methodologies - but being the newb that I am, I am unable to point out to you specifically which functions to use.

    That sounds like a fun project. Hope this helped.

    patd


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:08 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com