function netstatHosts($torrentAlias)
{
    return netstatHostsByPid(getTorrentPid($torrentAlias));
}
$label_upTotalCurrent = "";
$label_seeds = "";
$label_peers = "";
$label_maxcons = "";
$label_sharing = $sharing . '%';
if ($cfg["sharekill"] != 0) {
    $label_sharekill = $cfg["sharekill"] . '%';
} else {
    $label_sharekill = '&#8734';
}
if ($af->running == 1 && $alias != "") {
    $label_downTotalCurrent = formatFreeSpace($downTotalCurrent / 1048576);
    $label_upTotalCurrent = formatFreeSpace($upTotalCurrent / 1048576);
    $label_seeds = $af->seeds;
    $label_peers = $af->peers;
    $torrent_pid = getTorrentPid($alias);
    $torrent_port = netstatPortByPid($torrent_pid);
    $torrent_cons = netstatConnectionsByPid($torrent_pid);
    if ($cfg["max_download_rate"] != 0) {
        $label_max_download_rate = " (" . number_format($cfg["max_download_rate"], 2) . ")";
    } else {
        $label_max_download_rate = ' (&#8734)';
    }
    if ($cfg["max_upload_rate"] != 0) {
        $label_max_upload_rate = " (" . number_format($cfg["max_upload_rate"], 2) . ")";
    } else {
        $label_max_upload_rate = ' (&#8734)';
    }
    $label_maxcons = " (" . $cfg["maxcons"] . ")";
}
if ($af->percent_done < 0) {