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

블로그에 토렌토파일 EUC-KR로 변환소스 댓글로 올리신거...여기에다좀 복사좀 부탁드려요.

페이지 정보

작성자 no_profile 수리매니아 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 3건 조회 15,038회 작성일 11-02-06 17:47

본문

한번 해보고 싶은데 드레그가 안되서...ㅠㅠ
귀찮은 부탁좀 드릴게요~~

댓글목록

MintState님의 댓글

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

<?
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 '';
}
}
?>

위부분 입니다.

복사 잘 되던데요~~ ㅎ

수리매니아님의 댓글

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

뷰 파일을 수정했는데...적용이 안되네요...
파일변환을 전체하구...뷰파일의 내용중 위내용으로 교체했는데...
뷰 페이지가 일반기본게시판으로 내용만 나오네요...
압축파일이나 영화파일을 올려야 나오는건가요...
음....뭔가 빼먹구 한듯한데...ㅎㅎ 왜그렇죵 일반베이직 게시판으로 나오네요

Total 49건 1 페이지
Q&A 목록
번호 제목 글쓴이 조회 날짜
49 no_profile 길똥이 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 20512 12-13
48 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15828 04-27
47 no_profile shop1234 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15286 01-26
열람중 no_profile 수리매니아 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15039 02-06
45 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14754 04-14
44 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14542 03-12
43 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14249 04-21
42 no_profile MintState 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14208 02-01
41 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14146 04-27
40 no_profile 카가 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14135 03-31
39 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13937 03-25
38 no_profile 태양11 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13721 03-13
37 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13694 04-27
36 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13683 05-14
35 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13626 04-19
34 no_profile 신재영 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13498 04-25
33 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13450 04-12
32 no_profile 밤일기 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13450 08-30
31 no_profile 명예 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13141 04-17
30 no_profile nick1224 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13123 05-25
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2024, YesYo.com MintState. ™