1.x-dev 2015-03-11 13:51 UTC

This package is auto-updated.

Last update: 2021-04-26 18:46:24 UTC


This package allows to simplify the handling and serving of MetaLink files. The main class is Metalink, while ApacheMetalink is an example of Apache mirror list wrapped in a Metalink provider.

Basic Example

require_once 'vendor/autoload.php';

$path = 'lucene/solr/4.10.3/';
$meta = new Pnz\Metalink\ApacheMetalink($path);
$filename = basename($path);

header('Content-Type: application/metalink4+xml');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="' . $filename . '.metalink"');

print $meta->getMetalink4XML();