'; print_r($dir); echo ''; array_pop($dir); // . array_pop($dir); // .. // echo '
'; print_r($dir); echo '
'; $swarm = array(); foreach ($dir as $d) { $fst = substr($d, 0, 1); if ($fst == '.') { $swarm[] = $d; } } foreach ($swarm as $peer) { $peerName = file_get_contents('swarm/' . $peer . '/G1SSB/_g1.astroport_title'); echo '

'. $peerName . ' ['. substr($peer, 0, 5) . '…' . substr($peer, -4) . ']

'; $files = scandir('swarm/' . $peer . '/astroport/kodi/vstream', SCANDIR_SORT_DESCENDING); array_pop($files); // . array_pop($files); // .. foreach ($files as $f) { echo '

' . getCollectionType($f) . '

'; $collection = file_get_contents('swarm/' . $peer . '/astroport/kodi/vstream/' . $f); $collection = trim($collection); $videos = explode("\n", $collection); $videos = array_reverse($videos); array_pop($videos); echo ''; } }