Re: PHP mySQL and directory protection

From: steve (UseLinkToEmail_at_dbForumz.com)
Date: 08/18/04


Date: 18 Aug 2004 00:43:32 -0400


"davidshook" wrote:
> I have protected (with .htaccess) directory full of videos and
files.
> How do I create a user log-in (authentication) script using
php/mysql.
> the problem is:
> - I don’t want to create a new entery in the .htaccess/password
> file
> for each user.
>
> Here is a wrking example:
>
> user goes to Index.php and click a link for video
> link points to video.php (video.php is not in protected directory)
> video.php has an embeded video (videofile.wmv) and also has text
> description of the video.
> if the videofile.wmv is not restricted, user gets to see the video
and
> the description text.
> else if the videofiel.wmv is restricted, user gets a prompt for
> username/password. if the user has no login info he only gets to
see
> the description text and a text asking him to subscribe/register.
>
> The reason I am trying to avoid creating an entery in the .htaccess
> for each user is that I was told that after a few hundred enteries
the
> access and reading of the .htaccess is slowed.
> Also, with the .htaccess I have no way of tracking which user are
> logged in and if 2 different users are using the same password;
also
> it is difficult to log out user and keep tract of which videofiles
the
> prefer watching/downloading.

David, IMO you are asking for a very standard login process. I
searched on google using "php user login tutorial", and found the
following which looks excellent:
http://www.phpbuilder.com/columns/tim20000505.php3

-- 
http://www.dbForumz.com/  This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-mySQL-directory-protection-ftopict140665.html
Visit Topic URL to contact author (reg. req'd).  Report abuse: http://www.dbForumz.com/eform.php?p=470473


Relevant Pages

  • Re: No Response from Renli ( was Re: glGo self-destructed )
    ... A video from 12 October was outmoded by the 14 October ... successful login. ... we find glGo icons labeled ... These seem to be stale accounts. ...
    (rec.games.go)
  • Re: No Response from Renli ( was Re: glGo self-destructed )
    ... "Your video has arrived. ... I must at first notice that it is dated October 12, 2006 and yet account ... Renli ... such as what IP address a login came from. ...
    (rec.games.go)
  • Re: asp.net problem
    ... okay in the training video but not on my PC? ... LoginStatus displays "Login". ... is set to the secure page. ... secured by authentication, that can make it a lot easier to show files ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: User Authentication and password protection of several files
    ... I need a login page where user inputs a password and an email address. ... User clicks on one of the l inks in mainpage.php and watches a video ... This page has the following php code as of now ...
    (comp.lang.php)
  • Re: User Authentication and password protection of several files
    ... I need a login page where user inputs a password and an email address. ... User clicks on one of the l inks in mainpage.php and watches a video ... All pages in this setup a) need to be protected, ... When the user logs in, set a value in the $_SESSION array. ...
    (comp.lang.php)