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

토렌토 소스중 질문이요 ㅠ

페이지 정보

작성자 no_profile 푸푸 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 1건 조회 12,298회 작성일 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건 2 페이지
Q&A 목록
번호 제목 글쓴이 조회 날짜
29 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13195 03-13
28 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13101 10-20
27 no_profile orange 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13092 01-31
26 no_profile 라아 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12912 11-13
25 no_profile 강백호 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12782 05-17
열람중 no_profile 푸푸 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12299 11-01
23 no_profile minminmang 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12127 06-10
22 no_profile MintState 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12023 07-14
21 no_profile 멍구 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11952 07-09
20 no_profile 나루터 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11909 11-15
19 no_profile 긍정적마인드 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11901 06-30
18 no_profile 은지짱 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11780 12-01
17 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11716 04-21
16 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11654 05-28
15 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11641 04-26
14 no_profile 와꾸나라 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11491 03-01
13 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11353 06-06
12 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11352 03-26
11 no_profile 강백호 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11288 05-19
10 no_profile 농약 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11273 11-08
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2024, YesYo.com MintState. ™