vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Member Only Files (https://vborg.vbsupport.ru/showthread.php?t=46963)

okrogius 12-23-2002 10:00 PM

Member Only Files
 
Member Only Files
------------------------------------------------------------------------

What Is This?
There are plenty of hacks which allow you to protect regular php pages to be accessible only to your vb members. But how many hacks do you see that allow you to make your files member only? This one does preceisely that.

How Do I Install It?
Download attached file (download.php). You will need to edit some things on top of the file, fairly self explanatory. Then upload the file to the same folder where your vbulletin is installed. Now you can provide download links to your members such as:
http://www.yoursite.com/forums/downl...y_material.zip
Please note that filename can only contain letters, numbers, and underscores.

How Can I Thank You For This Hack?
1. Click the install button.
2. Go to my forums (http://forums.cgshock.com) and register and activate your account.\
Thanks.

Help! This doesn't work.
If something doesn't work post your problem here and I will try to help you get it working. Any support requests outside of this thread (whether pm, im, email, etc) will be IGNORED.

Enjoy. :)

Chris M 12-24-2002 06:58 PM

Looks good:)

Satan

Mystis 12-24-2002 07:11 PM

Very nice, I'm putting this one up right now!

Sebastian 12-24-2002 07:30 PM

doesn't seem to be working.. when i call a file it downloads a null file. hmm.

what about if you have a directory with your files called files but also have subdirectories with other files. how would you call the files in the sub directory, if at all possible?

Auero 12-24-2002 11:06 PM

Wow, great hack :D This is exactly the thing I've been looking for tonight. I did try the script found at www.phparena.net but that's a lot of files for one simple task :(

Great work codename

okrogius 12-25-2002 12:34 AM

Quote:

Originally posted by Sebastian
doesn't seem to be working.. when i call a file it downloads a null file. hmm.

what about if you have a directory with your files called files but also have subdirectories with other files. how would you call the files in the sub directory, if at all possible?

Doesn't seem to be working - Make sure you changed the path in the configuartion properly and that the file that you're ttempting to download exists.

Directories - It's possible, but you have to keep in mind of some things. For security purposes the filename goes througha r egular expression check, so someone doesn't go to download?file=/etc/passwd or the lik. It is possible to do folders too, but it makes the whole file parameter validation a whole lot more tedious.

Sebastian 12-25-2002 01:34 AM

nope, i set it to full path.. I tried to download a .php file and it worked.. but when i try to download a .zip, .rar, .exe it downloads a blank null file.. weird.. can anyone verify this? i am running php v4.3.0

Dean C 12-25-2002 11:12 AM

This is an awesome idea... so much room for expansion too!

I'm referring this to a friend of mine.. he'll have a great use to this hack :p

Thanks and Merry Christmas

- miSt

Lanigironu 12-26-2002 06:02 AM

I recently wrote something similar myself. Good job.

The only problem I see with this is that it won't take people too long to figure out where the files are coming from. What you should do is have a separate folder for the files, and have it chmoded so only a script can call for it. I'm not sure if such a chmod setting exists though. This way, even if the person knows where to get it, he or she can't without passing through the script.

okrogius 12-26-2002 01:42 PM

Obviously it shoudl be in a seperate folder. This is exactly hwo this file is written. And that folder should be in a non-webaccessible location as illustrated by the example url. ;)


All times are GMT. The time now is 05:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01229 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete