How do i create a website with login?

This is a discussion on How do i create a website with login? within the Tech Board forums, part of the Community Boards category; a small amount of php/perl/asp etc... will get the job done. Figure out what's available to you on that server ...

  1. #16
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    a small amount of php/perl/asp etc... will get the job done. Figure out what's available to you on that server and we'll see if we can help you better.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  2. #17
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669
    Here's an example .htaccess file - this FILE is simply a text called .htaccess

    Code:
    # -FrontPage-
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    <Limit GET POST>
    	order deny,allow
    	deny from all
    	allow from all
    </Limit>
    
    <Limit POST PUT DELETE>
    	order deny,allow
    	deny from all
    </Limit>
    
    AuthName www.someplace.com
    AuthUserFile  /www/htdocs/domains/s11/01695/www.someplace.com/webdocs/_vti_pvt/service.pwd
    AuthGroupFile /www/htdocs/domains/s11/01695/www.someplace.com/webdocs/_vti_pvt/service.grp
    You would store your usernames and password in a FILE called .htpassword - Here's how the .htpassword would look:

    Code:
    onestiffrod:ghyrxy123
    SEE my username is on the leftside and on the right is my password.

    There is a little bit to learn here but it looks more complicated than it really is.
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  3. #18
    ~- Y u n a -~ beely's Avatar
    Join Date
    Dec 2001
    Posts
    291

    Re: How do i create a website with login?

    Originally posted by hermit
    Hi,

    How do i create a site with login-password. For example i have a link to this PRIVATE SECTION. What kind of tools do i need? Please advice
    hehe.... you wan esay code? no problem!!
    check at my index.htm (http://dd.na.to), there's a link "admin", link it. and then view the source code and copy it. easy easy easy!!

  4. #19
    Registered User hermit's Avatar
    Join Date
    Apr 2002
    Posts
    213
    well im not confident on doing scripts like php or asp. looks damn complicated . . .


    jus tell me in simple terms, what do i need to learn ?
    PHP scripts? or ASP right?
    - - fUnKy F3m@le - -

  5. #20
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669
    http://www.euronet.nl/~arnow/htpassw...mentation.html

    Here, I'll do it for ya...
    Let's first create a .htpasswd file...
    Code:
    This is the .htpasswd file
    
    hermit:12345
    Now upload that .htpasswd file to your web, create a special folder would be best and simply place the file there, let's just call the folder where the file is 'users'. You can see that the .htpasswd file contains the user 'hermit' with a password of '12345'.

    Now, let's create the .htaccess file...
    Code:
     This is the .htaccess file
    
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>
    
    
    AuthUserFile /home/users/.htpasswd
    AuthGroupFile /dev/null
    AuthName Password page
    AuthType Basic
    require valid-user
    Change anything in BOLD.
    1) Change the AuthUserFile to the Folder where you have the .htpasswd file - this is a PATH so I think /home/ represents the root or www.yourplace.com you know your site address so all you have to change is the Folder name after.
    2) You can change AuthName to something like Hermit's Page

    Now, just upload the .htaccess file to the Particular Folder you want password protected.

    Here's a cgi program -FREE- that can simplify some of this for you.
    http://www.locked-area.com/html/dp/download.html
    Last edited by OneStiffRod; 11-21-2002 at 11:43 PM.
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  6. #21
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    i would recomend ASP with an access database.. it is easy to manage accounts and you can even write and admin page to change those.. but the obnly problem is... if your database is not in a secure place.. if people know the ful path theu can download the database.....

    So in my home page i have made my database file 45 char log with all junks.. still searching for a secure place to keep it....
    and in ASP each page before seving itself it can check if the user is a valid one or not...

    The solution OneStiffRod has given is also good but has some draw backs... you cannot easily get the state of the member on the page.. for different sectiion of users you will have to create different folders etc ect.. If you are a bugy programmer you better use his method since in ASP if you make a bug it can be exploited to access any pages.. And if he get access to one of the pages...(password protected) he can use the same trust(cookie , session variables etc eetc) whch other pages will recoognize as an authorized user...

  7. #22
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    >>looks damn hard

    you're not ready for this kind of thing yet. If you're not comfotable with doing the scripts either you're lazy or you're a clueless html weekend warrior (dont take that personally that's where we all start). I suggest starting otu doing simple things first to get a grip on the languages before taking on such a daunting task...for now try the htaccess thing, that'll be the easiest, no programming required.
    PHP and XML
    Let's talk about SAX

  8. #23
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669
    .htaccess is very robust and there is a ton more you can learn if you wish about it. For instance you can create a .htgroup file so you can have GROUPS of users with different levels of access. And I think you may be able to create/monitor sessions so you can tell if someone is currently logged in.

    The database stuff can become very complicated but is very good also for security.

    Here's yet another tut about it - this one is probably the easiest to understand.
    http://hotwired.lycos.com/webmonkey/...tml?tw=backend
    Last edited by OneStiffRod; 11-24-2002 at 02:21 PM.
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. login and password & printing
    By raithedavion in forum C++ Programming
    Replies: 2
    Last Post: 11-19-2006, 10:19 AM
  2. Create a file from c++ program
    By Dan17 in forum C++ Programming
    Replies: 2
    Last Post: 05-08-2006, 04:25 PM
  3. How to create login and password?
    By sherwi in forum C Programming
    Replies: 10
    Last Post: 04-11-2006, 09:54 AM
  4. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 05:23 AM
  5. How to Create reference to an array in C++
    By shiv_tech_quest in forum C++ Programming
    Replies: 2
    Last Post: 12-20-2002, 09:01 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21