Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Is there a way to view the index of a web page? In other words, to see what things are stored under a directory but aren't linked yet?
For example, lets say there is an .html website that just has hyperlinks to 3 documents, but there are more than 3 documents in that directory - can you find the url's of those other ones?
This may be a dumb question, but thanks...

thanks a lot- I am looking into it but I know nothing about PERL, is there an easier way - ie any applet, or how exactly would I do it with PERL - thanks.

I'd like to see an example as well...I didn't think this was possible unless directory browsing is available on the server and the dir doesn't have a default page.
I didn't see anything in LWP that would be of use...What portion were you referring to?
-SN

It's not completely clear from your post what you are trying to do. Do you want to view all files in an arbitrary directory on a web server, regardless of whether those files are referenced or linked in the default index document? Unless this is your webserver, there is a very good chance that you can't do that.
Listing the contents of a web directory is called indexing. Most web servers disallow directory indexing by default. You might be able to code something in perl to help you get a directory index. But, frankly, if you don't know anything about perl, coding your own tool is probably not a viable option at this point.

Analogous situation:There is a website:
www.goodfood.com/recipes/cajunrecipes.html which links to some recipes like
www.goodfood.com/recipes/gumbo.txt
I know there are more recipes on the website that aren’t linked – can I find out the URLs/get to them?
www.goodfood.com/recipes/cajunrecipes/ doesn’t go anywhere,
www.goodfood.com/recipes goes to a site that looks almost like www.goodfood.com except a few graphics don’t load
- I don’t know anything about the server, or Perl. If someone had a lot of energy and was nice and could tell me how (or direct me) to use LWP and perl (where should I dl it, how do I run it, what query do I enter), I would appreciate it and would be quite surprised…Anyways thanks a lot.

Perl is a server-side scripting language, sakivcomps. You have to have access to the server to run any perl script you create. And if you had access to the server you wouldn't need any special script to get a directory listing.
I think whoever told you to use perl for this didn't understand what you were asking (can't imagine why) and gave you bad advice. The short answer is: what you are trying to do can't be done. Not unless the web server allows directory indexing, which it sounds like it does not.

"Perl is a server-side scripting language, sakivcomps. You have to have access to the server to run any perl script you create."
Perl can be used as a server-side scripting language, but it is powerful enough to use in many other situations. With the advent of more advanced server-side scripting technologies, Perl is used heavily for unix/linux system maintenance, text parsing, and smaller miscellaneous scripts.
LWP was on the right track in that it allows a perl script to essentially act as a browser - make http requests, scrape web pages, get http responses, etc. But since allowing what you requested would be a security risk, no technology, LWP, Perl, or otherwise will do what you're asking for.
-SN

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |