Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Searching inside .zip files on internet

  1. Jan 23, 2014 #1
    Is anyone aware of a way to search through .zip files on the internet (such as in an archive site) without having to download and extract the files? For example, if I have a search phrase that may be in a .doc file inside a .zip file which is potentially stored with many other .zip files, I don't want to have to download them all and have to manually search through them, but would like to be able to at least find the correct .zip to download first.

    Many thanks.
  2. jcsd
  3. Jan 23, 2014 #2


    User Avatar
    Gold Member

    If your using HTTP version 1.1 then yes because you can use ranges.

  4. Jan 23, 2014 #3
    I think he is hoping to use a search engine - and I don't think any of them do what he wants.

    If he's writing the search code himself, your byte range thing would be useful if he could eliminate many of the files based on their filename. But whenever a zip file contained only files like *.txt, *.docx, he would still need to read the whole zip file.
  5. Feb 2, 2014 #4


    User Avatar
    Gold Member

    I can't think of any way for a search bot to look inside any file out on a web server without first retrieving the file to local disk. It seems irrelevant whether the file is compressed (zipped) or not. If you are writing code, you can certainly get a library to open the zip so it can be searched as plain text or whatever format you expect.

    Unless perhaps you were able to inject pernicious code onto the web server itself so that the code runs THERE, but that would be only if you are permitted to add code to a site. It would not apply to most sites. If your code is looking at files on the web, they must first be fetched to your local disk by the HTTP client. Period.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook