PDA

View Full Version : help with client login script please!



pelicanmike
22 May 2006, 04:30 AM
This is probably a very simple question, but here goes:

I'm writing a client login script using PHP - how it is going to work is this:
1. usual will login via a login form using PHP
e.g. www.mysite.com/admin/
2. this will take the user to a page which lists all files in a certain directory - with links for them to download

This works fine.. The only problem i have is that there is nothing to stop the user typing the URL to the downloadable file in their browsers, thus bypassing my security!! e.g. by typing in www.mysite.com/admin/files/picture1.jpg

Any ideas of a simple solution to this?? Can i somehow use CHMOD to only allow access to the files using a PHP script?

Mike

tyros8000
22 May 2006, 11:30 AM
hey,
the link don't work.

but if you want to passwd a folder or file there are options in the cpanel for you do to do this.

alternately just get a simple login script from either www.hotscripts.com or google.com. There are loads which will do the job.

i found this one which doesn't look bad. http://txtbox.co.za/p_txtauth.php

it seems to do everything you want.