<?php
header('Content-Type: application/json');

$dnsFolderPath = __DIR__;

$items = scandir($dnsFolderPath);

$folders = array_filter($items, function($item) use ($dnsFolderPath) {
    return is_dir($dnsFolderPath . '/' . $item) && $item !== '.' && $item !== '..';
});

echo json_encode(array_values($folders));
?>
