Menu

Password Protected Albums

2001-02-26
2001-03-14
  • William Borrelli

    OK, how about password protecting some albums. I would like to be able to prevent people from seeing some of the pictures I have.

    But alao have full access to other albums.

    Anyone able to hack this in yet?

     
    • William Borrelli

      I figured it out. removed "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">" seems to work fine still, and was able to add some code to lock down directories.

       
    • Anonymous

      Anonymous - 2001-02-27

      I'm not sure why removing the document preamble did anything for you, did you try putting it back in to see if you really had to remove it?  I have a feeling you'll find it was unneeded.

      Anyway, could you send your changes in as a diff?  This is something a few other people have asked for, and it'd be snazz to have code to do it.  :-)

       
      • Bryan Kilian

        Bryan Kilian - 2001-03-09

        It probably was actually needed. At a guess he implemented PHP based auth, I was thinking of doing that, and it doesn't work if you have _any_ output before sending the auth headers. Which is why he had to remove the headers at the top of the files.

        Unfortunately, it does nothing to stop people grabbing the picture directories directly. At the moment, I'm thinking of checking for a .htaccess in a dir and using the settings in that as a guide for asking for password. It wouldn't carry over to IIS though, they have a different protection scheme.

         
        • William Borrelli

          You are correct. I am using the PHP based auth. I tried using the .htaccess method, but it creates the thumbnails before seeing the .htaccess file, so that didn't work properly. I have an empty index.php file in each directoy, and have hacked in index.php as one of the invisible files. That way, if someone were to try and access the directory they would just get an empty page.

          I suppose they could type in a picture file name, but if they can't see what's in there, they don't know what to type in. It's very simplistic, but it works.

          As far as a diff file? heh, like I know how to use diff to do that :)

          I also added another script that would put a cute little shadow around the image.

          example:
          http://boostersdilemma.com/phpix/view.php?album=Paintball&pic=FILE0023.jpg&dispsize=512&start=20&picindex=23

          At this point, I am REALLY happy with phpix. The fact that it creates thumbs on the fly, and you can resize the image. Other ones I have used, I had to resize the image, and then also create thumbs. I can just dump from the digital camera, and set the family to looking.

          Excellent job.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.