#!/usr/bin/php5 $v){ $original = $v; $nsize = strlen($match[2][$k]); if ($nsize != $match[1][$k] && strstr($original, $newSite)){ $temp = serialize($match[2][$k]); $dump = str_replace($original, $temp, $dump); ++$x; } } } file_put_contents($newFile, $dump); echo "generated file : $newFile - $x modification(s)\n"; ?>