"; return; } reset($array); switch($array['type'] ?? '') { case "string": printf("
  • - [STRING] [%s] (%d): %s
  • ",$parent,$array['strlen'],$array['value']); break; case "integer": printf("
  • - [INT] [%s] (%d): %s
  • ",$parent,$array['strlen'],$array['value']); break; case "list": printf("
  • + [LIST] [%s] (%d)
    ",$parent,$array['strlen']); echo "
  • "; break; case "dictionary": printf("
  • + [DICT] [%s] (%d)
    ",$parent,$array['strlen']); foreach ($array as $key => $val) { if (is_array($val)) { echo ""; } } echo "
  • "; break; default: foreach ($array as $key => $val) { if (is_array($val)) { //echo $offset; print_array($val, $offset_symbol, $offset, $key); } } break; } } dbconn(); loggedinorreturn(); if (get_user_class() < $torrentstructure_class) { permissiondenied(); } $id = (int)$_GET["id"]; if (!$id) httperr(); $res = sql_query("SELECT name FROM torrents WHERE id = ".sqlesc($id)) or sqlerr(__FILE__, __LINE__); $row = mysql_fetch_assoc($res); $fn = "$torrent_dir/$id.torrent"; if (!$row || !is_file($fn) || !is_readable($fn)) httperr(); // Standard html headers stdhead("Torrent Info"); ?>

    $row[name]

    "); $dict = bdec_file($fn, (1024*1024)); // Start table print("
    "); $dict['value']['info']['value']['pieces']['value'] = "0x".bin2hex(substr($dict['value']['info']['value']['pieces']['value'], 0, 25))."..."; echo "
      "; print_array($dict,"*", "", "root"); echo "
    "; // End table print("
    "); ?>