Quote Originally Posted by litewarez View Post
Firstly you need to break it up.

  • Archive Opening (extraction into memory) | gzopen
  • Parsing the contents (Extract links from tags) | preg_match_all
  • Compile the output.


So i would start by making a base class to work with
Before i can build the getMeta() method witch will hold the links and other statuses, i need to examine the contents of the text file to look for similarities
He doesn't need regex, just to check if it contains rs, mu or whatever else.
Also, gzfile() should be fine for any gzipped text file.

Porsche_maniak: the code I posted will read one gzipped text file and check which hosts it contains. This seems like what you are asking for.

If you wish to handle multiple files, simply read each one in a loop or use a class and have an object per file.

Regardless of how you read it in though, that is how you should match certain strings.