토렌트 검색기 소스 > 그누4 팁자료실

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.

토렌트 검색기 소스 정보

토렌트 검색기 소스

본문

제가 직접한거라 조금 허접합니다 ㅎ
 
이소스를 참고해서 상업적으로 사용하시면 당연히 안되겠죠? 공유 및 공부목적입니다~
 
출처밝히지 않고 사용하시면~저작권 위반으로 맘속으로 욕하고 있겠습니다~ㅎ
 
http://www.shotbirdie.com 에서 사용하다가 요즘엔 토렌트 검열 문제로 사용하지 않습니다~
 
검열문제로 Snoopy.class.php파일은 배포중지 하겠습니다

<?
$g4_path = ".";
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/mw.builder.lib.php");
if($shotbirdie_tkey){
 $ti_de = urldecode($shotbirdie_tkey);
 $g4[title] = "자료실 > 토렌트검색 : $ti_de";
}else{
 $g4[title] = "자료실 > 토렌트검색";
}
@include_once("$g4[path]/head.php");
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->
</script>
<style>
/* 가이드박스 */
.jyGuideBox {margin-top:30px; padding:20px; background:#f2f2f2;}
.jyGuideBox .txt_title {padding-left:20px; height:17px; line-height:19px; font-weight:bold; color:#333; background:url('./img/ico_sprites_bule.gif') no-repeat 2px 2px;}
.jyGuideBox ul {padding-top:8px;}
.jyGuideBox li {padding-left:20px; height:18px; line-height:20px; font-size:11px; color:#999; list-style:none; background:url('./img/ico_sprites_bule.gif') no-repeat 10px -30px;}
</style>
<!--상단검색-->
<table width="730"  border="0" align="center" cellpadding="0" cellspacing="0">
                              <tr>
                                <td width="29"><img src="http://soncook2.cdn2.cafe24.com/shotbirdie/search_left.gif" width="29" height="79"></td>
                                <td valign="top" background="http://soncook2.cdn2.cafe24.com/shotbirdie/search_bodybg.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td height="40"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="3" height="6"></td>
                                            <td height="6"></td>
                                          </tr>
                                          <tr>
                                            <td> </td>
                                            <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                  <td width="150" class="search_txt">토렌트검색</td>
                                                  <td class="search_txt"><div align="right">
<?
 $k01 = urlencode("1박2일");
 $k02 = urlencode("무한도전");
 $k03 = urlencode("런닝맨");
 $k04 = urlencode("남자의자격");
 $k05 = urlencode("영어공부");
 $k06 = urlencode("음악");
 $k07 = urlencode("성인");
 $k08 = urlencode("서식");
 $k09 = urlencode("자막");
 $k10 = urlencode("강좌");
 $k11 = urlencode("나는가수다");
 
?>
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k05?>'><span class='search_txt'><u>영어공부</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k11?>'><span class='search_txt'><u>나는 가수다</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k01?>'><span class='search_txt'><u>1박2일</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k02?>'><span class='search_txt'><u>무한도전</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k03?>'><span class='search_txt'><u>런닝맨</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k04?>'><span class='search_txt'><u>남자의자격</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k06?>'><span class='search_txt'><u>음악</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k07?>'><span class='search_txt'><u>성인</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k08?>'><span class='search_txt'><u>무료서식</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k09?>'><span class='search_txt'><u>자막</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k10?>'><span class='search_txt'><u>강좌</u></span></a>             
             
              </div></td>
                                                </tr>
                                            </table></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td height="39"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <form type="get" action="<?=$PHP_SELF_SELF?>">
                                            <tr>
                                              <td><input name=shotbirdie_tkey maxlength=30 itemname="토렌트 검색어" required value='<?=$shotbirdie_tkey?>' style="width:620; height:22px;"></td>
                                              <td width="60"><div align="right">
                                                  <input name="image" type=image src="http://soncook2.cdn2.cafe24.com/shotbirdie/search_bt.gif" align=absmiddle  width="49" height="21" border=0>
                                              </div></td>
                                            </tr>
                                        </form>
                                      </table></td>
                                    </tr>
                                </table></td>
                                <td width="20"><img src="http://soncook2.cdn2.cafe24.com/shotbirdie/search_right.gif" width="20" height="79"></td>
                              </tr>
</table>
<!--상단검색-->
<center>매일 10~11시, 15~16시, 20~23시는 비회원 다운로드 가능(회원은 언제나 가능)</center>
<?
if($shotbirdie_tkey == ''){ }else{
require './lib/Snoopy.class.php';
ini_set("allow_url_fopen","1");
 
switch($sort_code){
 case 'a': //최근
  $sort = "a/d/";
  $scolor01 = "style='color: #990000;'";
  break;
 case 'c': //인기
  $sort = "c/d/";
  $scolor02 = "style='color: #990000;'";
  break;
 case 's': //시더
  $sort = "s/d/";
  $scolor03 = "style='color: #990000;'";
  break;
 case 'n': //이름
  $sort = "n/d/";
  $scolor04 = "style='color: #990000;'";
  break;
 case 'z': //크기
  $sort = "z/d/";
  $scolor05 = "style='color: #990000;'";
  break;
 default: //인기
  $sort = "c/d/";
  $scolor02 = "style='color: #990000;'";
  $tpage = 1;
  break;
}
switch($tpage){
 case '1':
  $tcolor01 = "style='color: #990000; font-weight:bold;'";
  break;
 case '2':
  $tcolor02 = "style='color: #990000; font-weight:bold;'";
  break;
 case '3':
  $tcolor03 = "style='color: #990000; font-weight:bold;'";
  break;
 default:
  $tcolor02 = "style='color: #990000; font-weight:bold;'";
  break;
}
$url = "http://bitsnoop.com/search/all/".$shotbirdie_tkey."/".$sort.$tpage."/?fmt=rss";
  $snoopy = new Snoopy;
  $snoopy->fetch($url);
  $xml = @simplexml_load_string($snoopy->results);
  $listct = '30'; //첫 파싱후 2번째부터는 수량조절용으로 사용(최적화를 위해)
  //$listct = count($xml->item);
 
//테이블상단
echo "
<br><br>
<table width='730' height='30' border='0' align='center' cellpadding='0' cellspacing='0'>
  <tr>
    <td>
<table width='100%'  border='0' cellspacing='5' cellpadding='0'>
  <tr>
    <td width='50%' align='left'><a href='./bbs/board.php?bo_table=notice&wr_id=3' target='_blank'><font color='#990000'>토렌트 설치 및 사용법</a></td>
    <td width='50%' align='right'>
<!--순서-->
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=a&tpage=$tpage'><span $scolor01>최신순</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=c&tpage=$tpage'><span $scolor02>인기순</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=s&tpage=$tpage'><span $scolor03>시드순</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=n&tpage=$tpage'><span $scolor04>이름순</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=z&tpage=$tpage'><span $scolor05>크기순</span></a>
 </td>
  </tr>
</table>
 </td>
  </tr>
</table>
<table width='730' border='0' align='center' cellpadding='0' cellspacing='0'>
  <tr>
    <td><table width='100%'  border='0' cellspacing='0' cellpadding='0'>
      <tr>
        <td height='1' bgcolor='BFBFBF'></td>
      </tr>
      <tr>
        <td height='32' bgcolor='FAFAFA'><table width='100%'  border='0' cellspacing='0' cellpadding='0'>
          <tr>
            <td width='38' align='center'>번호</td>
            <td width='500' align='center'>제목</td>
            <td width='66' align='center'>크기</td>
            <td width='38' align='center'>시드</td>
            <td width='44' align='center'>마그넷</td>
            <td width='44' align='center'>토렌트</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height='1' bgcolor='EDEDED'></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
";
  for($i=0; $i<$listct; $i++){
    $wr_subject[$i] = $xml->channel->item[$i]->title;
    $category[$i] = $xml->channel->item[$i]->category;
    $link[$i] = $xml->channel->item[$i]->link;
    $pubDate[$i] = $xml->channel->item[$i]->pubDate;
    $numSeeders[$i] = $xml->channel->item[$i]->numSeeders;
    $numLeechers[$i] = $xml->channel->item[$i]->numLeechers;
    $numFiles[$i] = $xml->channel->item[$i]->numFiles;
    $numComments[$i] = $xml->channel->item[$i]->numComments;
    $size[$i] = $xml->channel->item[$i]->size;
    $fileName[$i] = $xml->channel->item[$i]->torrent->fileName;
    $url_join[$i] = 'http://torrage.com/torrent/'.$fileName[$i];
    $contentLength[$i] = $xml->channel->item[$i]->torrent->contentLength;
    $infoHash[$i] = $xml->channel->item[$i]->torrent->infoHash;
    $magnetURI[$i] = $xml->channel->item[$i]->torrent->magnetURI;
    $wr_content[$i] = $xml->channel->item[$i]->description;
    //echo "$wr_subject / $fileName / $url_join<br>";
    //순번
    $num = $i+1;
    //파일용량
    $size[$i] = round(($size[$i] / 1024)/1024);
   
    //회원가입에 따른차등
    if(!$member['mb_id']){
     //안내메세지
     $tmsg = "매일 10~11시, 15~16시, 20~23시는 비회원 다운로드 가능하세요^^";
    
     $timeinfo = getdate(time());
     if(($timeinfo[hours] >= '10' and $timeinfo[hours] < '11') or ($timeinfo[hours] >= '15' and $timeinfo[hours] < '16') or ($timeinfo[hours] >= '20' and $timeinfo[hours] < '23')){
      $magnetURI_m[$i] = "<a href='$magnetURI[$i]' target='_blank'  onClick=\"MM_popupMsg('$tmsg')\"><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img01.GIF' border='0'></a>";
      $url_join_m[$i] = "<a href='$url_join[$i]' target='_blank'  onClick=\"MM_popupMsg('$tmsg')\"><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img02.GIF' border='0'></a>";
     }else{
      $magnetURI_m[$i] = "<a href='http://web.search.naver.com/search.naver?where=site&sm=dir_hty&query=%BC%A6%B9%F6%B5%F0&ctgids=' target='_blank'  onClick=\"MM_popupMsg('$tmsg-샷버디 클릭후에 로그인 해주시면 됩니다')\"><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img01.GIF' border='0'></a>";
      $url_join_m[$i] = "<a href='http://web.search.naver.com/search.naver?where=site&sm=dir_hty&query=%BC%A6%B9%F6%B5%F0&ctgids=' target='_blank'  onClick=\"MM_popupMsg('$tmsg-샷버디 클릭후에 로그인 해주시면 됩니다')\"><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img02.GIF' border='0'></a>";
     }
    }else{ //로그인시
     $magnetURI_m[$i] = "<a href='$magnetURI[$i]'><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img01.GIF' border='0'></a>";
     $url_join_m[$i] = "<a href='$url_join[$i]'><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img02.GIF' border='0'></a>";
    }
   
   //중복내용
    echo "
     <table width='100%'  border='0' cellspacing='0' cellpadding='0'>
        <tr>
       <td><table width='100%' height='33'  border='0' cellpadding='0' cellspacing='0'>
         <tr>
        <td width='38' align='center'>$num</td>
        <td width='500'>$wr_subject[$i]</td>
        <td width='66' align='center'>$size[$i]MB</td>
        <td width='38' align='center'>$numSeeders[$i]</td>
        <td width='44' align='center'>$magnetURI_m[$i]</td>
        <td width='44' align='center'>$url_join_m[$i]</td>
         </tr>
       </table></td>
        </tr>
        <tr>
       <td height='1' bgcolor='EDEDED'></td>
        </tr>
      </table>
     ";
    //echo "$num - <a href='$url_join[$i]' target='_blank'>$wr_subject[$i]</a><br>";
  }//end for($i)
//테이블하단
echo "
 </td>
  </tr>
  <tr>
 <td align='center'>
<!--페이지-->
   <a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=$sort_code&tpage=1'><span $tcolor01>1</span></a> |
   <a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=$sort_code&tpage=2'><span $tcolor02>2</span></a> |
   <a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=$sort_code&tpage=3'><span $tcolor03>3</span></a>
  </td>
  </tr>
</table>
";
} //end if(shotbirdie_tkey)
?>
<div class="jyGuideBox">
  <p class="txt_title">반드시 읽어보세요.</p>
  <ul>
  <li>본 서비스는 토렌트 외부 검색기로, 토렌트 통합검색을 제공합니다.</li>
  <li>검색자료는 서버에 저장, 관리 하지 않으며, 검색 및 다운로드만을 제공합니다.</li>
  <li>업로드 서비스는 제공되지 않으며, 이미지를 제공하지 않습니다.</li>
  <li>일부 파일은 다운로드 되지 않을 수 있으며, 자료의 질에 대해서는 보장하지 않습니다.</li>
  </ul>
</div>
<?
//유가정보
/*
$contents = file_get_contents("http://www.opinet.co.kr/cp/avg_price.jsp");
$xml = simplexml_load_string($contents);
$count =  count($xml->item);
for ($i=0;$i<$count;$i++){
 $DATE = $xml->item[$i]->DATE;
 $PRODNM = $xml->item[$i]->PRODNM;
 $PRICE = $xml->item[$i]->PRICE;
 $DIFF = $xml->item[$i]->DIFF;
 echo "$DATE | $PRODNM | $PRICE |$DIFF<br>";
}
*/
?>
<?
@include_once("$g4[path]/tail.php");
?>
 
 
추천
15

댓글 47개

글자가 깨지는 분들은
아마도 검색 후 제목이 깨져 나올텐데요.
제목 부분은 $wr_subject[$i] 이고 이부분을 iconv 로 캐릭셋 바꿔두면 되겠죠.
뷰내용의모든소스들을 새php파일을 만들어 업로드하고 첨부파일을 lip폴더에 업로드하였는데
경로는 어떤걸바꿔주란말인지...요

http://logoweb.kr/Snoopy.class.php 게 햇는데 검색이안되요..
글세요. 토렌트 자체는 아무 문제가 없는거니 애매하네요? ㅎㅎ
저작권이 있는 음원이나 동영상이라면 당연히 법적으로 문제가 있겠죠~
다만, 프리웨어나 저작권을 포기?한 상품이라면 공유할만 하겠죠~.~
http://logoweb.kr/Snoopy.class.php?shotbirdie_tkey=%B3%B2%C0%DA%C0%C7%C0%DA%B0%DD  이건왜 이렇게뜨는거죠.. eu 변환기로 변환하여 올렷어요...
1. 위에 게시물 소스를
복사해서
1.php를 파일을 생성합니다.

2.  Snoopy.class.php 파일을 lib 폴더에 붙어넣기합니다.

3. 위소스에서
<?
$g4_path = ".";
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/mw.builder.lib.php");
if($shotbirdie_tkey){
 $ti_de = urldecode($shotbirdie_tkey);
 $g4[title] = "자료실 > 토렌트검색 : $ti_de";
}else{
////////////
include_once("$g4[path]/lib/mw.builder.lib.php");  //제거합니다

그럼 끝
http://홈페이지/1.php
사용중인 웹서버의 PHP 버전이 5버전이 아니라면 이 검색기는 사용할 수 없네요.
$xml = @simplexml_load_string($snoopy->results);
여기에 쓰인 simplexml_load_string 함수가 php5에서만 작동된다고 합니다.
않되는 분들은 참고하세요.
저는 다른 php5/uft8무료호스팅에 설치해서 아이프레임으로 가져왓다가
제 홈피에서 많은 의미가 없다고 생각되어 삭제했습니다...
경로를 맞춰주라하셨는데 snoopy.class.php파일의 어느 부분을 수정해야하는건가요?
이것저것 수정해도 snoopy.class.php파일에서 717 에러만 나고 검색되지 않네요.
경로를 맞춰주지 않은 상태에서는 검색결과가 전혀 엉뚱하게 나오고요 ㅠㅠ
토렌트 검색해서 다운 받아보신분? 씨드 받으려고 하니까 없는 페이지라고 뜨는군요..이러면 무슨 소용..OTL
혹시나 해서 샷버디 님 홈페이지에가서 다운해보니 저랑 똑같은 상황이네요.. 홈피가 폭파된건가요 ㅠㅠ
샷버디 님 홈페이지는 수정이 됐네요..이소스는 주소가 소문자고 샷버디 님 홈페이지 수전하신곳의 주소는 대문자로 나오면서 정상 다운 되네여..수정하셨으면 이곳도 수정좀 해주시지..
http://sataeng.com/mw/552.php?shotbirdie_tkey=%EB%82%98%EB%8A%94%EA%B0%80%EC%88%98%EB%8B%A4
위와 같이 내용이 없는 부분이 있거나, 검색 시 다른 내용이 출력된다면 어디를 손봐야 하나요?
// $fileName[$i] = $xml->channel->item[$i]->torrent->fileName; 수정하세요
$fileName[$i] = strtoupper($xml->channel->item[$i]->torrent->fileName);
전체 3,313 |RSS
그누4 팁자료실 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT