Computing.Net > Forums > Web Development > Viewing index of web page

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Viewing index of web page

Reply to Message Icon

Name: sakivcomps
Date: May 1, 2005 at 13:19:36 Pacific
OS: XP
CPU/Ram: 512, not sure
Comment:

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...



Sponsored Link
Ads by Google

Response Number 1
Name: cdac1000
Date: May 1, 2005 at 13:35:55 Pacific
Reply:

yes. Use LWP module of perl.


0

Response Number 2
Name: sakivcomps
Date: May 1, 2005 at 13:57:02 Pacific
Reply:


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.


0

Response Number 3
Name: SN
Date: May 1, 2005 at 16:21:28 Pacific
Reply:

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


0

Response Number 4
Name: jimminy
Date: May 1, 2005 at 16:24:44 Pacific
Reply:

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.


0

Response Number 5
Name: sakivcomps
Date: May 1, 2005 at 16:49:19 Pacific
Reply:


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.


0

Related Posts

See More



Response Number 6
Name: jimminy
Date: May 1, 2005 at 17:03:43 Pacific
Reply:

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.


0

Response Number 7
Name: SN
Date: May 1, 2005 at 21:13:02 Pacific
Reply:

"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


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Viewing index of web page

best length of web page www.computing.net/answers/webdevel/best-length-of-web-page/3875.html

Website Showing up as index of/ www.computing.net/answers/webdevel/website-showing-up-as-index-of/4170.html

how do you save web page www.computing.net/answers/webdevel/how-do-you-save-web-page/1191.html