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

Viewing index of web page

Reply to Message Icon

Original Message
Name: sakivcomps
Date: May 1, 2005 at 13:19:36 Pacific
Subject: Viewing index of web page
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...


Report Offensive Message For Removal

Response Number 1
Name: cdac1000
Date: May 1, 2005 at 13:35:55 Pacific
Subject: Viewing index of web page
Reply: (edit)

yes. Use LWP module of perl.


Report Offensive Follow Up For Removal

Response Number 2
Name: sakivcomps
Date: May 1, 2005 at 13:57:02 Pacific
Subject: Viewing index of web page
Reply: (edit)


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.


Report Offensive Follow Up For Removal

Response Number 3
Name: SN
Date: May 1, 2005 at 16:21:28 Pacific
Subject: Viewing index of web page
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 4
Name: jimminy
Date: May 1, 2005 at 16:24:44 Pacific
Subject: Viewing index of web page
Reply: (edit)

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.


Report Offensive Follow Up For Removal

Response Number 5
Name: sakivcomps
Date: May 1, 2005 at 16:49:19 Pacific
Subject: Viewing index of web page
Reply: (edit)


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.


Report Offensive Follow Up For Removal


Response Number 6
Name: jimminy
Date: May 1, 2005 at 17:03:43 Pacific
Subject: Viewing index of web page
Reply: (edit)

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.


Report Offensive Follow Up For Removal

Response Number 7
Name: SN
Date: May 1, 2005 at 21:13:02 Pacific
Subject: Viewing index of web page
Reply: (edit)

"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


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Viewing index of web page

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software