Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    I have a web site that I want to attach a file too, and the only way to download is to enter a password or access code first. That way I can prevent just anyone from downloading from the web site. Is this possible or do you have any suggestion? I know how to attach file to web site, just not sure about the rest

  2. #2
    4 Star Lounger
    Join Date
    Feb 2004
    Location
    Saint Charles, Missouri, USA
    Posts
    565
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='ababenchrist' post='790331' date='22-Aug-2009 22:31']I have a web site that I want to attach a file too, and the only way to download is to enter a password or access code first. That way I can prevent just anyone from downloading from the web site. Is this possible or do you have any suggestion? I know how to attach file to web site, just not sure about the rest[/quote]
    This will depend on the service provider for your website. The way I do it is to setup a sub-directory on the website, access my control panel for the sub-directory and specify requirement for a password and what the password needs to be. I then let the people know what the password is to access the site.

    As an aside - I even password protect some of the files on the site depending if they are to be shared with the whole group or just a few individuals (ex a document that will be shared but only after one or two people have had a chance to comment/verify it).
    Scott

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='ababenchrist' post='790331' date='22-Aug-2009 23:31']... only way to download is to enter a password ...[/quote]
    I swear by /www.dlguard.com/

  4. #4
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    [quote name='chrisgreaves' post='790347' date='23-Aug-2009 03:39']I swear by /www.dlguard.com/[/quote]

    Hi and I thank you for your suggestions
    First off I am using a Yahoo small business web site and I used their site builder tool. I did not use any of their templates, I manually set it up. I tried using a navigation button from one page to another page that holds the download, I know how to set that part up, but I was unable to figure out how to password protect that navigation button that will allow you to enter the selected download page. I also tried to add a password protection to my zip file download and was unable to figure that out also.

  5. #5
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='ababenchrist' post='790362' date='23-Aug-2009 06:26']Hi and I thank you for your suggestions
    First off I am using a Yahoo small business web site and I used their site builder tool. I did not use any of their templates, I manually set it up. I tried using a navigation button from one page to another page that holds the download, I know how to set that part up, but I was unable to figure out how to password protect that navigation button that will allow you to enter the selected download page. I also tried to add a password protection to my zip file download and was unable to figure that out also.[/quote]

    I learned how to passwaord protect my zip file
    Just double-click the zipped folder. In the top menu select File then click "Add a Password".
    But I would still like to know if I can protect entery to download page.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    A software developer anticipated your post with its page "How to password protect web pages created with Yahoo Sitebuilder?" Naturally, they suggest their $39 program.

    Yahoo! SiteBuilder lets you use PHP. There are likely dozens of references for how to use PHP to password protect a page or file. Here's a sample Google search: php password protect file - Google Search.

  7. #7
    New Lounger
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jscher2000 View Post
    A software developer anticipated your post with its page "How to password protect web pages created with Yahoo Sitebuilder?" Naturally, they suggest their $39 program. <img src='/forums/images/smilies/smile.gif' class='bbc_emoticon' alt='' />

    Yahoo! SiteBuilder lets you use PHP. There are likely dozens of references for how to use PHP to password protect a page or file. Here's a sample Google search: php password protect file - Google Search.
    Without writing the PHP code for you, here are the steps required:

    1) Display form to user, including any authentication requirements you may have (user name, email, password, etc)
    2) On form submission, validate authentication using whatever method you see fit (querying against a database, hard-coded array of users and passwords, etc)
    3) On successful authentication, read file in with PHP (see file() function), send HTTP headers (see header() function) containing file name, content type, size, etc.
    4) Stream buffered file out to user

    I've used this method on several web sites and clients - it works well and does not reveal the actual path to the file

    Some useful HTTP headers for streaming content to a user include:

    Code:
    header("Content-Description: File Transfer");
    header("Content-Type: {$mimetype}");
    header("Content-Disposition: attachment; filename=\"{$filename}\"");
    header("Content-Transfer-Encoding: binary\n");
    header("Accept-Ranges: bytes");
    header("Content-Length: {$filesize}");

Posting Permissions

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