Password Protected Client Area

Do you have cpanel as an admin area for your site? It's really easy to set up password protected folders through that.

Otherwise your looking at setting up htaccess files in the protected folders and it's so long since I've done that I'll have to leave it to someone else to explain how it's done.
 
What you want is server side authentification.

Does your site server run php (perl, or similiar) or are you limited to embeded java script?
This is the key question.

If it's the latter then you dont really have any control of what the end-user can see by browsing the downloaded page (or javascript links), so you can only implement simple checks. Anyone with a bit of
time and knowledge can work out how to break in.

If you are willing to write your source pages with some php embedded then you get complete control over whats sent out.
 
It supports CGI, C, Perl AND Python (PHP 5)

I am currently looking at http://www.zubrag.com/scripts/password-protect.php which I found (of course :-) ) just after I posted, to see if I can work it out. It is so long since I did any kind of coding, and that was just editing something someone else created to my own preferences by trial and error, that I am basically learning totally from scratch again
 
Hi Chris

I tried to have a look at it on your site (Gallery?) but could not get past the open/close menu and nothing seemed to load?

The site is in a state of 'flux' at the moment, and will not be back up till weekend. :nuts: :bang:
 
google .htaccess - setting up passwords for files, folders, etc. is easy and doesn't need any s/w or coding, just put a couple of files in the right places and job done :thumbs:
 
I have some php code for logging into pages that doesn't require any mysql databases (although the database route is the best way to go). It does need to be tested some more and fine tuned..but i think it kinda works. Let me know if you want the code and I'll dig it out.

You can also do the htaccess route like pxl8 says, but only if your on an apache server..as windoze servers dont have htaccess i believe.

:)
 
Christine

I presume it's for photographs to be viewed by your portrait clients and you want a different password for each user.

What hosting company do you use for your website? If you able to use gallery2 on your hosting package (needs SQL and PHP) then I would recommend this as once it's installed it's very easy to setup and use and you can password protect albums. You can even upload to it using a remote upload client which makes large uploads very easy. There is even a simple to use paypal e-commerce cart plugin so that your photos over the web and people can pay using paypal. Along with a number of other very tog friendly features

I use it on my site www.justsee.co.uk/gallery. I don't have any photos in a password protected gallery yet but I will set one up later and post the URL and the password so you can check for yourself how effective it is.

I can reccommend heart internet as a hosting package £89 a year and you get gallery2 as a one click install :thumbs:
 
If you know a little php (or any coding then) try this for size, just knocked it up, but it works.

GRRRR!!! the curly braces needed are eaten by the parser so I've replaced
open curly brace => "^"
close curly brace => "&"

Code:
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">

<?php
if((isset($_POST["username"])) and $_POST["username"]!="")
^
    $access=0;

    if($_POST["username"]=="user1" and $_POST["password"]=="user1")
    ^
        $access=1;
        echo "Hello and welcome<br>";
        include "user1_personal_home_page.html";
    &

    if($access==0)
    ^
        echo "NO WAY HOSE!<br>";
        #include "you_are_not_allowed.html";
    &

&
else
^

    echo "
        <head>
        <title>Front Page</title>
        </head>
        <body>
        <h1>Front Page</h1>

        <form name=\"access\"  method=\"post\" action=\"testform.php\">
        UserName:<input type=text name=username>
        <br>
        Password:<input type=password name=password>
        <hr>
        <input type=submit name=submit value=\"submit username and password\">
        </form>
        </body>
        ";
&

?>
</html>
 
Back
Top