Created
December 7, 2012 10:31
-
-
Save armetiz/4232372 to your computer and use it in GitHub Desktop.
Use file_get_contents instead of SplFileObject::fpassthru()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
ini_set('memory_limit', '500M'); | |
use Symfony\Component\Finder\Finder; | |
$finder = new Finder(); | |
$finder->files() | |
->in(__DIR__ . "/../") | |
->name("access_proxy_log*"); | |
$patternPodcast = "/podcasts/"; | |
foreach ($finder as $file) { | |
$contents = $file->getContents(); | |
preg_match_all($patternPodcast, $contents, $matches); | |
unset($contents); | |
unset($matches); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment