pnz / metalink
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/pnz/metalink
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-09-27 05:05:54 UTC
README
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/solr-4.10.3.zip'; $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(); die();