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

토렌토 소스중 질문이요 ㅠ

페이지 정보

작성자 no_profile 푸푸 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 1건 조회 12,302회 작성일 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 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10458 03-16
48 no_profile MintState 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10587 05-04
47 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10828 04-03
46 no_profile goqigi 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10918 03-26
45 no_profile 김형식 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11028 06-02
44 no_profile goqigi 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11061 04-10
43 no_profile MintState 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11161 06-02
42 no_profile goqigi 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11199 03-26
41 no_profile goqigi 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11262 03-26
40 no_profile 농약 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11274 11-08
39 no_profile 강백호 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11289 05-19
38 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11353 03-26
37 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11355 06-06
36 no_profile 와꾸나라 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11491 03-01
35 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11643 04-26
34 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11656 05-28
33 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11717 04-21
32 no_profile 은지짱 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11781 12-01
31 no_profile 긍정적마인드 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11902 06-30
30 no_profile 나루터 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11911 11-15
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2024, YesYo.com MintState. ™