?> </li> <li>Setting up file structure... <?php if (!is_dir($CONFIG['torrent_folder'])) { mkdir($CONFIG['torrent_folder']); chmod($CONFIG['torrent_folder'], 0777); $torrent->write("FORBIDDEN", $CONFIG['torrent_folder'] . "/index.html"); chmod($CONFIG['torrent_folder'] . "/index.html", 0666); if (!is_numeric($CONFIG['torrent_id_length']) || (int) $CONFIG['torrent_id_length'] < 0) { $CONFIG['torrent_id_length'] = 1; } if ($CONFIG['torrent_id_length'] > 32) { $CONFIG['torrent_id_length'] = 32; } $token = $torrent->token(TRUE, TRUE); $data = $torrent->serializer(array($CONFIG['torrent_id_length'])); if ($torrent->write($data, $torrent->setDataPath($token, TRUE) . "/" . $token)) { chmod($torrent->setDataPath($token, TRUE) . "/" . $token, 0666); echo "<span class=\"success\">Structure created!</span>"; $stage[] = 2; } else { echo "<span class=\"error\">Failed</span> - Is directory '" . $CONFIG['torrent_folder'] . "' writable?"; } } ?> </li> <?php } if (count($stage) > 1) { ?>