0

I would like to read zip file with TXT file inside, but my zip exists on different url, not on the local machine. I tried both ways without success.

  1. $result = file_get_contents('zip://http://www.abcde.com/12345.zip#1234.txt'); or
  2. $fp = fopen('zip://http://www.abcde.com/12345.zip#1234.txt', 'r'); Any idea how to do it?
  • Does this answer your question? [How to read a single file inside a zip archive](https://stackoverflow.com/questions/10420112/how-to-read-a-single-file-inside-a-zip-archive) – Nico Haase Sep 09 '22 at 11:36

1 Answers1

0

The best solution is to copy the zip from remote to local and then it should work better.

FF MM
  • 138
  • 9