21, November 2008

Access user for non html files - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Access user for non html files
« previous next »
Pages: [1] Print

Author Topic: Access user for non html files  (Read 1064 times)
Metal slug addict
*
Posts: 18
132 credits
Members referred : 0


« on: Aug 07, 2006, 12:36:18 AM »

Hi,

I'm having great success using this class as a basis for protecting my site. I would appreciate any pointers from you how I can protect non-html files (PDF, zips, etc) using this class.

Regards, Jeff



Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6435
39434 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Aug 07, 2006, 01:10:28 AM »

Hello Jeff,

You need to protect a directory with files using a .htacces file.

while using the access_user class you can protect the downloader file: http://www.finalwebsites.com/snippets.php?id=4 Visit through proxy

while using file functions its possible to open files while the folders are protected with .htaccess (I do the same to protect hot linking of my classes)


Last blog : Just a better Internet portal provided by Google
Metal slug addict
*
Posts: 18
132 credits
Members referred : 0


« Reply #2 on: Aug 07, 2006, 01:38:01 AM »

I think I understand this but just to be clear............

Use an .htaccess fie to protect the download directory.

Even though there is no communication between php and .htaccess the fact that you will be downloading the file by using the links to the files that you have provided on the page that is protected with access user class it should work correct?

Thanks. If my understanding is correct you have given the first explanation of this that I finally can understand.

Jeff

Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6435
39434 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Aug 07, 2006, 01:56:18 AM »

yes right, a php script acts with the rights of the server admin thats why it's possible.


Last blog : Just a better Internet portal provided by Google
Metal slug addict
*
Posts: 18
132 credits
Members referred : 0


« Reply #4 on: Aug 08, 2006, 04:47:09 PM »

Thanks Olaf. Worked perfectly. You do have a typo in the code at your site.

$fullPath = $path.$_GET['downnload_file'];

downnload should only have one n.

Best regards, Jeff
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6435
39434 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Aug 08, 2006, 05:37:36 PM »

Thanks Olaf. Worked perfectly. You do have a typo in the code at your site.

$fullPath = $path.$_GET['downnload_file'];

downnload should only have one n.

Best regards, Jeff


after years I know why this script is not working Cheesy

thanks man!


Last blog : Just a better Internet portal provided by Google
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=3564
Tags : php html Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Access user for non html files
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Nov 21, 2008, 06:44:25 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 37.714
Total Topics: 7.646
Total Members: 4.390
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: panetolikos

33 Guests, 4 Users online :

20 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.