height] = $ns->value; } krsort($names); // Get namespace content $parts = _exec( $argv[1], sprintf( '%s %s "\d+"', 'keva_filter', $argv[2] ) ); print_r($parts); // Merge content data $data = []; foreach ($parts as $part) { $data[$part->key] = $part->value; } ksort($data); // Save merged data to destination $filename = isset($argv[3]) ? $argv[3] : sprintf( '%s/../data/import/kevacoin.%s.%s', __DIR__, $argv[2], $names[array_key_first($names)] ); file_put_contents( $filename, base64_decode( implode('', $data) ) ); echo sprintf( 'saved to %s' . PHP_EOL, $filename );