$lines = explode("\n", file_get_contents("Packages"));
$thispkg = "";
$packages = Array("etvd", "etvd-data", "etvd-h264enc", "etvd-telnetd",
"etvd-www-common", "etvd-www-em", "etvdcurses-em", "ffmpeg",
"libavcodec52", "libavdevice52", "libavfilter0", "libavformat52",
"libavutil49", "libdvbpsi4", "libicu40", "libpostproc51",
"libsqlite3-0", "libswscale0", "usplash-theme-etvd");
foreach($lines as $line)
{
$parts = split(":", $line);
if(sizeof($parts) > 1){
$k = trim($parts[0]);
$v = trim($parts[1]);
if($k == "Package"){
$thispkg = $v;
}
if($k == "Filename"){
if(array_search($thispkg, $packages) !== FALSE){
print "";
print
"http://packages.emhub.com/etvd2.8.3/$v
";
}
}
}
}
?>