YesYo.com MintState Forums
뒤로    YesYo.com MintState BBS > Miscellaneous > Q&A
검색
멤버이름    오토
비밀번호 
 

토렌토 소스중 질문이요 ㅠ

페이지 정보

작성자 no_profile 푸푸 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 1건 조회 12,318회 작성일 11-11-01 11:32

본문

<?
require_once ("torrent.php");
for ($i=0; $i<=count($view[file]); $i++) {
if (torrent_getExt($view[file][$i][source]) == "torrent") {
$file_full_path = $view[file][$i][path]."/".$view[file][$i][file];
if (file_exists($file_full_path)) {
$torrent_file = file_get_contents($file_full_path);
$torrent_array = BDecode($torrent_file);
$torrent_hash=sha1(BEncode($torrent_array['info']));

echo "<table width=".(int)$board[bo_image_width]." border=0 cellpadding=5 cellspacing=1 bgcolor='#DDDDDD' style='margin-bottom:10px'>";
echo "<tr><td colspan=2 align=center bgcolor='#FFD48E'><strong>".iconv("UTF-8","EUC-KR",$torrent_array['info']['name'])."</strong></td></tr>";
echo "<tr><td width=100 bgcolor='#D7D3CF'>마그넷</td><td bgcolor='#FFFFFF'>magnet:?xt=urn:btih:".$torrent_hash."</td></tr>";
echo "<tr><td bgcolor='#D7D3CF'>트래커</td><td bgcolor='#FFFFFF'>";
$announce_list_cnt = count($torrent_array['announce-list']);
for ($al=0;$al < $announce_list_cnt;$al++) {
echo $torrent_array['announce-list'][$al][0]."<br />";
}
echo "</td></tr>";
if ($torrent_array['comment']) {
echo "<tr><td bgcolor='#D7D3CF'>코멘트</td><td bgcolor='#FFFFFF'>".iconv("UTF-8","EUC-KR",$torrent_array['comment'])."</td></tr>";
}
echo "<tr><td bgcolor='#D7D3CF'>생성일</td><td bgcolor='#FFFFFF'>".date("Y-m-d",$torrent_array['creation date'])."</td></tr>";
echo "<tr><td bgcolor='#D7D3CF'>파일</td><td bgcolor='#FFFFFF'>";

if ($torrent_array['info']['length']) {
echo iconv("UTF-8","EUC-KR",$torrent_array['info']['name']);
echo " (".get_filesize($torrent_array['info']['length']).")";
} else {
$torrent_total_size = 0;
for ($tf=0;$tf <  count($torrent_array['info']['files']);$tf++) {
$info_file_path_cnt = count($torrent_array['info']['files'][$tf]['path']);
echo ($tf+1).": ";
for ($j=0;$j < $info_file_path_cnt;$j++) {
echo iconv("UTF-8","EUC-KR",$torrent_array['info']['files'][$tf]['path'][$j]);
if ($j < $info_file_path_cnt-1) echo "/";
}
echo " (".get_filesize($torrent_array['info']['files'][$tf]['length']).")";
echo "<br />";
$torrent_total_size = $torrent_total_size + $torrent_array['info']['files'][$tf]['length'];
}
echo "총 파일 사이즈 : ".get_filesize($torrent_total_size);
}
echo "</td></tr>";
echo "</table>";
}
}
}

// 확장자 알아오기
function torrent_getExt($str) {
$f = explode(".", $str);
$l=sizeof($f);
if($l>1) {
return strtolower($f[$l-1]);
} else {
return '';
}
}
?>

게시판 리스트에 파일 용량을 표시하려고 합니다

어떤 부분을 빼내야 될지 궁금하네요~

도움좀 주세요~

감사합니다.

댓글목록

MintState님의 댓글

no_profile MintState 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

보기 페이지가 아닌 리스트 페이지 말씀 하시는 건가요???
음...
그렇다면 리스트 루프 돌때 토런트 파일 가져와서 분석 하시면 됩니다.

활용만 하시면 쉽게 만드실수 있을건데요...

Total 49건 1 페이지
Q&A 목록
번호 제목 글쓴이 조회 날짜
49 no_profile nick1224 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13267 05-25
48 no_profile 라아 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12938 11-13
열람중 no_profile 푸푸 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12319 11-01
46 no_profile 밤일기 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13578 08-30
45 no_profile 신재영 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13628 04-25
44 no_profile 수리매니아 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15169 02-06
43 no_profile MintState 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14332 02-01
42 no_profile orange 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13105 01-31
41 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13818 04-27
40 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14279 04-27
39 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15953 04-27
38 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14375 04-21
37 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13746 04-19
36 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14894 04-14
35 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13581 04-12
34 no_profile 카가 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14269 03-31
33 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14068 03-25
32 no_profile 태양11 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13854 03-13
31 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14668 03-12
30 no_profile shop1234 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15426 01-26
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2024, YesYo.com MintState. ™