Reputation: 159
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
Reputation: 79069
ftp
http
& https
are protocols to view web applications. Features like directory listing
are done from server, not through such protocols.
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
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