<?php
function getAvailableCategories($file) {
    if (!file_exists($file)) return [];
    $content = file_get_contents($file);
    preg_match_all('/group-title="([^"]+)"/i', $content, $matches);
    $categories = array_unique($matches[1]);
    sort($categories);
    return $categories;
}
?>

