Majinbibo
Majinbibo

Reputation: 159

How to count files in https?

Is it possible to count files under a directory when you're only reading to https url? or only possible through ftp?

Upvotes: 0

Views: 587

Answers (2)

Starx
Starx

Reputation: 79069

Only through ftp

http & https are protocols to view web applications. Features like directory listing are done from server, not through such protocols.

Explanation in case of php & apache server

When you are using commands like scandir() to read file and directory, its the server that does the reading for you. not any http or https link. The page you browse through such protocols will only deliver the output markup on the page.

Through these protocols, all files except server-side files can be delivered on their actual format.

Upvotes: 2

Thomas Schultz
Thomas Schultz

Reputation: 2467

Typically directory listings are disabled on websites.

wget can be used crawl a site. Using wget to recursively fetch a directory with arbitrary files in it

If directory listings aren't disabled on a site then you could download the page and parse the html to get the file count.

Upvotes: 1

Related Questions