![]() |
PHP/HTML indexing?
Is there a way with PHP to generate HTML of an index?
Lets say there are 50 files in root/goat_cheese/ and I dont like having indexing turned on. How do I get PHP to output an HTML file that lists these 50 files without letting someone know the dir name. It would be a nice security feature. ~k_day64 |
Crap, this is in one of my books on how to do it.
Here's a recursive one: http://www.phpbuilder.com/snippet/do...snippet&id=747 Here's another: http://www.phpbuilder.com/snippet/do...snippet&id=726 I'm sure with a little tweaking, you could get either to work. |
Quote:
What security concerns do you have? |
Quote:
~k_day64 |
Quote:
Hopefully I understood your concerns and this advice is helpful. |
Depending if you have enough access rights to your server, you could set up your server to automatically use the forementioned code instead of the "No directory listing allowed" html.
|
Quote:
Quote:
So, it's a question of resources, if you have a larger budger than the CIA and more computing power than 20 earth simulators, then you're likely safe to stick to closed source :) Quote:
anyway, my solution would be to remember to use dud index.html in all sub directories as well, because image urls and things reveal part of the directory structure. It all depends what level you're aiming for. If you really want to go for it, you could use a keyed method for generating urls (the key in php, with the links opened in js). |
All times are GMT -8. The time now is 11:25 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project