차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
tech:torrent [2014/08/30 10:39] – [예] fe80:4852:64df:b1dd:fe73:ca34:7c28:eae5tech:torrent [2018/10/17 22:07] (현재) – [공개 트래커] V_L
줄 1: 줄 1:
 +{{tag> torrent p2p 토렌트 유토렌트 utorrent}}
 ======토렌트 (Torrent)====== ======토렌트 (Torrent)======
  
줄 26: 줄 27:
 =====국내===== =====국내=====
 ^  이름  ^  참고  ^ ^  이름  ^  참고  ^
-| [[http://torrentdown.kr|토다]] |가입불필요웹하드랑 제휴해서 이상해짐. | +| https://torrentwal.net |토렌트킴 벡업본인듯| 
-| [[http://torrentmoa.com|토렌트모아 ]]| TV,AV 위주... 가입불필요, AV는 필요+| [[http://torrentdown.kr|토다]] | 망함.. | 
-| [[http://www.toshare.kr/|투쉐어]] |현재 가입 막혀있음+| [[http://torrentmoa.com|토렌트모아 ]]| 망함..| 
-| [[http://to0u.com|투공유]] |  +| [[http://www.toshare.kr/|투쉐어]] | 망함
-| [[http://www.torr.kr|토르]] | 한글검색엔진.. 단순 검색이라 가짜가 많음.|+| [[http://to0u.com|투공유]] | 방심위가 차단함 
 +| [[http://www.torr.kr|토르]] |망함...|
  
 국내 토렌트 사이트 보기 : 한글 토렌트(torrent) 검색기 "티토렌트(Ttorrent)" 국내 토렌트 사이트 보기 : 한글 토렌트(torrent) 검색기 "티토렌트(Ttorrent)"
줄 39: 줄 41:
  
  
- +[[106]] 
-^  이름  ^  참고 +
-[[http://www.BitSnoop.com|빗스눕]]| 한글 검색이 된다.(*) 한쿡인들 많음 | +
-| [[https://torrentz.eu/help|Torrentz]] | 토렌트 전용 메타 검색엔진.. 빠르고 깔끔함.| +
-| [[http://movietorrents.eu]] | 영화 전용 | +
-| [[http://www.mininova.org|mininova   ]]| 성인물.. 시드순위별정리 기능. 가짜 확인| +
-| [[http://javjunkies.com/|제뷔정키스]]|일본 av전문.  한국 ip 차단, 프록시 필요| +
-| [[http://scrapetorrent.com/|SCRAPEtorrent]] | 한글 검색은 되지 않지만, 외국자료가 많은 토렌트 검색 사이트 이다.| +
-|[[http://www.bittorrent.com/|bittorrent]] | 요즘 이상해짐.. | +
-|[[http://www.thepiratebay.org| thepiratebay ]] | | +
-| [[http://www.torrentportal.com| torrentportal ]]| | +
-|[[http://www.btmon.com| btmon ]]| | +
-|[[http://www.sumotorrent.com| sumotorrent ]]|| +
-|[[http://www.torrentreactor.net|torrentreactor  ]]| | +
-|[[http://www.btjunkie.org| btjunkie ]]| | +
-|[[http://www.extratorrent.com|extratorrent  ]]| | +
-|[[http://www.tokyo-tosho.net| tokyo-tosho ]]|애니메이션 | +
-|[[http://www.nyaatorrents.org| nyaatorrents ]]|애니메이션 | +
-|[[http://www.hongfire.com| hongfire ]]|애니메이션 | +
-|[[http://www.akiba-online.com | akiba online ]]|애니메이션 [[:차단]]됨 |+
  
  
줄 64: 줄 47:
 등록이 필요 없는 공개 트래커를 찾고 있다면, 아래의 주소중 한 곳을 사용하라: 등록이 필요 없는 공개 트래커를 찾고 있다면, 아래의 주소중 한 곳을 사용하라:
  
-  * http://open.tracker.thepiratebay.org/announce +<file> 
-  * http://www.torrent-downloads.to:2710/announce +udp://tracker.coppersurfer.tk:6969/announce 
-  * http://denis.stalker.h3q.com:6969/announce +udp://tracker.pirateparty.gr:6969/announce 
-  * http://www.sumotracker.com/announce +udp://tracker.coppersurfer.tk:6969 
-  * http://pirates.sumotracker.com/announce +udp://9.rarbg.me:2710/announce 
-  * [[udp://open.demonii.com:1337]] +udp://public.popcorn-tracker.org:6969/announce 
-  * [[udp://tracker.publicbt.com:80]] +udp://tracker.opentrackr.org:1337/announce 
-  * http://exodus.desync.com:6969/announce+</file> 
  
  
줄 165: 줄 149:
 ====토렌트 정보 긁기==== ====토렌트 정보 긁기====
  
-<file torrent.php php>+<file php torrent.php>
 <?php <?php
 // 기본적으로 UTF-8 형식임. // 기본적으로 UTF-8 형식임.
 +// 출처: http://blog.yesyo.com/72
 // Protect our namespace using a class // Protect our namespace using a class
 class BDecode { class BDecode {
- function numberdecode($wholefile, $offset) { +    function numberdecode($wholefile, $offset) { 
- // Funky handling of negative numbers and zero +        // Funky handling of negative numbers and zero 
- $negative = false; +        $negative = false; 
- if ($wholefile[$offset] == '-') { +        if ($wholefile[$offset] == '-') { 
- $negative = true; +            $negative = true; 
- $offset++; +            $offset++; 
- +        
- if ($wholefile[$offset] == '0') { +        if ($wholefile[$offset] == '0') { 
- $offset++; +            $offset++; 
- if ($negative) +            if ($negative) 
- return array(false); +                return array(false); 
- if ($wholefile[$offset] == ':' || $wholefile[$offset] == 'e'+            if ($wholefile[$offset] == ':' || $wholefile[$offset] == 'e'
- return array(0, ++$offset); +                return array(0, ++$offset); 
- return array(false); +            return array(false); 
- +        
- $ret[0] = 0; +        $ret[0] = 0; 
- for(;;) { +        for(;;) { 
- if ($wholefile[$offset] >= '0' && $wholefile[$offset] <= '9') { +            if ($wholefile[$offset] >= '0' && $wholefile[$offset] <= '9') { 
- $ret[0] *= 10; +                $ret[0] *= 10; 
- //Added 2005.02.21 - VisiGod +                //Added 2005.02.21 - VisiGod 
-        //Changing the type of variable from integer to double to prevent a numeric overflow    +           //Changing the type of variable from integer to double to prevent a numeric overflow 
- settype($ret[0],'double'); +                settype($ret[0],'double'); 
- //Added 2005.02.21 - VisiGod +                //Added 2005.02.21 - VisiGod 
- $ret[0] += ord($wholefile[$offset]) - ord('0'); +                $ret[0] += ord($wholefile[$offset]) - ord('0'); 
- $offset++; +                $offset++; 
- } else if ($wholefile[$offset] == 'e' || $wholefile[$offset] == ':') { +               else if ($wholefile[$offset] == 'e' || $wholefile[$offset] == ':') { 
- // Tolerate : or e because this is a multiuse function +                // Tolerate : or e because this is a multiuse function 
- $ret[1] = $offset+1; +                $ret[1] = $offset+1; 
- if ($negative) { +                if ($negative) { 
- if ($ret[0] == 0) +                    if ($ret[0] == 0) 
- return array(false); +                        return array(false); 
- $ret[0] = - $ret[0]; +                    $ret[0] = - $ret[0]; 
- +                
- return $ret; +                return $ret; 
- } else return array(false); +            } else return array(false); 
- +        
- }+    }
  
- function decodeEntry($wholefile, $offset=0) { +    function decodeEntry($wholefile, $offset=0) { 
- if ($wholefile[$offset] == 'd'+        if ($wholefile[$offset] == 'd'
- return $this->decodeDict($wholefile, $offset); +            return $this->decodeDict($wholefile, $offset); 
- if ($wholefile[$offset] == 'l'+        if ($wholefile[$offset] == 'l'
- return $this->decodelist($wholefile, $offset); +            return $this->decodelist($wholefile, $offset); 
- if ($wholefile[$offset] == 'i'+        if ($wholefile[$offset] == 'i'
- return $this->numberdecode($wholefile, ++$offset); +            return $this->numberdecode($wholefile, ++$offset); 
- // String value: decode number, then grab substring+        // String value: decode number, then grab substring
  
- $info = $this->numberdecode($wholefile, $offset); +        $info = $this->numberdecode($wholefile, $offset); 
- if ($info[0] === false) +        if ($info[0] === false) 
- return array(false); +            return array(false); 
- $ret[0] = substr($wholefile, $info[1], $info[0]); +        $ret[0] = substr($wholefile, $info[1], $info[0]); 
- $ret[1] = $info[1]+strlen($ret[0]); +        $ret[1] = $info[1]+strlen($ret[0]); 
- return $ret; +        return $ret; 
- }+    }
  
- function decodeList($wholefile, $offset) { +    function decodeList($wholefile, $offset) { 
- if ($wholefile[$offset] != 'l'+        if ($wholefile[$offset] != 'l'
- return array(false); +            return array(false); 
- $offset++; +        $offset++; 
- $ret = array(); +        $ret = array(); 
- for ($i=0;;$i++) { +        for ($i=0;;$i++) { 
- if ($wholefile[$offset] == 'e'+            if ($wholefile[$offset] == 'e'
- break; +                break; 
- $value = $this->decodeEntry($wholefile, $offset); +            $value = $this->decodeEntry($wholefile, $offset); 
- if ($value[0] === false) +            if ($value[0] === false) 
- return array(false); +                return array(false); 
- $ret[$i] = $value[0]; +            $ret[$i] = $value[0]; 
- $offset = $value[1]; +            $offset = $value[1]; 
- +        
- // The empty list is an empty array. Seems fine. +        // The empty list is an empty array. Seems fine. 
- return array(0=>$ret, 1=>++$offset); +        return array(0=>$ret, 1=>++$offset); 
- }+    }
  
- // Tries to construct an array +    // Tries to construct an array 
- function decodeDict($wholefile, $offset=0) { +    function decodeDict($wholefile, $offset=0) { 
- if ($wholefile[$offset] == 'l'+        if ($wholefile[$offset] == 'l'
- return $this->decodeList($wholefile, $offset); +            return $this->decodeList($wholefile, $offset); 
- if ($wholefile[$offset] != 'd'+        if ($wholefile[$offset] != 'd'
- return false; +            return false; 
- $ret=array(); +        $ret=array(); 
- $offset++; +        $offset++; 
- for (;;) {  +        for (;;) { 
- if ($wholefile[$offset] == 'e') { +            if ($wholefile[$offset] == 'e'   
- $offset++; +                $offset++; 
- break; +                break; 
- +            
- $left = $this->decodeEntry($wholefile, $offset); +            $left = $this->decodeEntry($wholefile, $offset); 
- if (!$left[0]) +            if (!$left[0]) 
- return false; +                return false; 
- $offset = $left[1]; +            $offset = $left[1]; 
- if ($wholefile[$offset] == 'd') { +            if ($wholefile[$offset] == 'd') { 
- // Recurse +                // Recurse 
- $value = $this->decodedict($wholefile, $offset); +                $value = $this->decodedict($wholefile, $offset); 
- if (!$value[0]) +                if (!$value[0]) 
- return false; +                    return false; 
- $ret[addslashes($left[0])] = $value[0]; +                $ret[addslashes($left[0])] = $value[0]; 
- $offset= $value[1]; +                $offset= $value[1]; 
- continue; +                continue; 
- +            
- if ($wholefile[$offset] == 'l') { +            if ($wholefile[$offset] == 'l') { 
- $value = $this->decodeList($wholefile, $offset); +                $value = $this->decodeList($wholefile, $offset); 
- if (!$value[0] && is_bool($value[0])) +                if (!$value[0] && is_bool($value[0])) 
- return false; +                    return false; 
- $ret[addslashes($left[0])] = $value[0]; +                $ret[addslashes($left[0])] = $value[0]; 
- $offset = $value[1]; +                $offset = $value[1]; 
- continue; +                continue; 
- +            
- $value = $this->decodeEntry($wholefile, $offset); +            $value = $this->decodeEntry($wholefile, $offset); 
- if ($value[0] === false) +            if ($value[0] === false) 
- return false; +                return false; 
- $ret[addslashes($left[0])] = $value[0]; +            $ret[addslashes($left[0])] = $value[0]; 
- $offset = $value[1]; +            $offset = $value[1]; 
- +        
- return array(0=>(empty($ret)?true:$ret), 1=>$offset); +        return array(0=>(empty($ret)?true:$ret), 1=>$offset); 
- }+    }
 } // End of class declaration. } // End of class declaration.
  
 // Use this function. eg:  BDecode("d8:announce44:http://www. ... e"); // Use this function. eg:  BDecode("d8:announce44:http://www. ... e");
 function BDecode($wholefile) { function BDecode($wholefile) {
- $decoder = new BDecode; +    $decoder = new BDecode; 
- $return = $decoder->decodeEntry($wholefile); +    $return = $decoder->decodeEntry($wholefile); 
- return $return[0];+    return $return[0];
 } }
  
줄 298: 줄 282:
 // using a class // using a class
 class BEncode { class BEncode {
- // Dictionary keys must be sorted. foreach tends to iterate over the order +    // Dictionary keys must be sorted. foreach tends to iterate over the order 
- // the array was made, so we make a new one in sorted order. :) +    // the array was made, so we make a new one in sorted order. :) 
- function makeSorted($array) { +    function makeSorted($array) { 
- // Shouldn't happen! +        // Shouldn't happen! 
- if (empty($array)) +        if (empty($array)) 
- return $array; +            return $array; 
- $i = 0; +        $i = 0; 
- foreach($array as $key => $dummy) +        foreach($array as $key => $dummy) 
- $keys[$i++] = stripslashes($key); +            $keys[$i++] = stripslashes($key); 
- sort($keys); +        sort($keys); 
- for ($i=0; isset($keys[$i]); $i++) +        for ($i=0; isset($keys[$i]); $i++) 
- $return[addslashes($keys[$i])] = $array[addslashes($keys[$i])]; +            $return[addslashes($keys[$i])] = $array[addslashes($keys[$i])]; 
- return $return; +        return $return; 
- }+    }
  
- // Encodes strings, integers and empty dictionaries. +    // Encodes strings, integers and empty dictionaries. 
- // $unstrip is set to true when decoding dictionary keys +    // $unstrip is set to true when decoding dictionary keys 
- function encodeEntry($entry, &$fd, $unstrip = false) { +    function encodeEntry($entry, &$fd, $unstrip = false) { 
- if (is_bool($entry)) { +        if (is_bool($entry)) { 
- $fd .= 'de'; +            $fd .= 'de'; 
- return; +            return; 
- +        
- if (is_int($entry) || is_float($entry)) { +        if (is_int($entry) || is_float($entry)) { 
- $fd .= 'i'.$entry.'e'; +            $fd .= 'i'.$entry.'e'; 
- return; +            return; 
- +        
- if ($unstrip) +        if ($unstrip) 
- $myentry = stripslashes($entry); +            $myentry = stripslashes($entry); 
- else +        else 
- $myentry = $entry; +            $myentry = $entry; 
- $length = strlen($myentry); +        $length = strlen($myentry); 
- $fd .= $length.':'.$myentry; +        $fd .= $length.':'.$myentry; 
- }+    }
  
- // Encodes lists +    // Encodes lists 
- function encodeList($array, &$fd) { +    function encodeList($array, &$fd) { 
- $fd .= 'l'; +        $fd .= 'l'; 
- // The empty list is defined as array(); +        // The empty list is defined as array(); 
- if (empty($array)) { +        if (empty($array)) { 
- $fd .= 'e'; +            $fd .= 'e'; 
- return; +            return; 
- +        
- for ($i = 0; isset($array[$i]); $i++) +        for ($i = 0; isset($array[$i]); $i++) 
- $this->decideEncode($array[$i], $fd); +            $this->decideEncode($array[$i], $fd); 
- $fd .= 'e'; +        $fd .= 'e'; 
- }+    }
  
- // Passes lists and dictionaries accordingly, and has encodeEntry handle +    // Passes lists and dictionaries accordingly, and has encodeEntry handle 
- // the strings and integers. +    // the strings and integers. 
- function decideEncode($unknown, &$fd) { +    function decideEncode($unknown, &$fd) { 
- if (is_array($unknown)) { +        if (is_array($unknown)) { 
- if (isset($unknown[0]) || empty($unknown)) +            if (isset($unknown[0]) || empty($unknown)) 
- return $this->encodeList($unknown, $fd); +                return $this->encodeList($unknown, $fd); 
- else +            else 
- return $this->encodeDict($unknown, $fd); +                return $this->encodeDict($unknown, $fd); 
- +        
- $this->encodeEntry($unknown, $fd); +        $this->encodeEntry($unknown, $fd); 
- }+    }
  
- // Encodes dictionaries +    // Encodes dictionaries 
- function encodeDict($array, &$fd) { +    function encodeDict($array, &$fd) { 
- $fd .= 'd'; +        $fd .= 'd'; 
- if (is_bool($array)) { +        if (is_bool($array)) { 
- $fd .= 'e'; +            $fd .= 'e'; 
- return; +            return; 
- +        
- // NEED TO SORT! +        // NEED TO SORT! 
- $newarray = $this->makeSorted($array); +        $newarray = $this->makeSorted($array); 
- foreach($newarray as $left => $right) { +        foreach($newarray as $left => $right) { 
- $this->encodeEntry($left, $fd, true); +            $this->encodeEntry($left, $fd, true); 
- $this->decideEncode($right, $fd); +            $this->decideEncode($right, $fd); 
- +        
- $fd .= 'e'; +        $fd .= 'e'; 
- }+    }
 } // End of class declaration. } // End of class declaration.
  
 // Use this function in your own code. // Use this function in your own code.
 function BEncode($array) { function BEncode($array) {
- $string = ''; +    $string = ''; 
- $encoder = new BEncode; +    $encoder = new BEncode; 
- $encoder->decideEncode($array, $string); +    $encoder->decideEncode($array, $string); 
- return $string;+    return $string;
 } }
  
 $url = trim($_GET[url]); $url = trim($_GET[url]);
 if ($url) { if ($url) {
- $alltorrent = trim(Yreadfile($url, ''));+        $alltorrent = trim(Yreadfile($url, ''));
 } else exit; } else exit;
 if ($alltorrent == "") exit; if ($alltorrent == "") exit;
줄 396: 줄 380:
 $announce_list_cnt = count($array[$announce_list]); $announce_list_cnt = count($array[$announce_list]);
 for ($i=0;$i < $announce_list_cnt;$i++) { for ($i=0;$i < $announce_list_cnt;$i++) {
- echo $array[$announce_list][$i][0]; +    echo $array[$announce_list][$i][0]; 
- if ($i < $announce_list_cnt-1) +    if ($i < $announce_list_cnt-1) 
- echo ", "; +        echo ", "; 
- else  +    else 
- echo "<br />";+        echo "<br />";
 } }
  
줄 410: 줄 394:
 $info_files_cnt = count($array[info][files]); $info_files_cnt = count($array[info][files]);
 for ($i=0;$i < $info_files_cnt;$i++) { for ($i=0;$i < $info_files_cnt;$i++) {
- $info_file_path_cnt = count($array[info][files][$i][path]); +    $info_file_path_cnt = count($array[info][files][$i][path]); 
- $file_cnt++; +    $file_cnt++; 
- echo $file_cnt.": "; +    echo $file_cnt.": "; 
- for ($j=0;$j < $info_file_path_cnt;$j++) { +    for ($j=0;$j < $info_file_path_cnt;$j++) { 
- echo $array[info][files][$i][path][$j]; +        echo $array[info][files][$i][path][$j]; 
- if ($j < $info_file_path_cnt-1) echo "/"; +        if ($j < $info_file_path_cnt-1) echo "/"; 
- echo " (".$array[info][files][$i][length]."byte)"; +        echo " (".$array[info][files][$i][length]."byte)"; 
-+    
- echo "<br />";+    echo "<br />";
 } }
- 
  
 /* /*
- 아래 소켓방식으로 파일 가저오기는 유창화 님의 소스 입니다.+ 아래 소켓방식으로 파일 가저오기는 유창화 님의 소스 다.
  */  */
-//변수가 정의 되었으면 해당 값을 반환하고 정의 되어있지 않으면 지정된 기본값을 반환합니다.+//변수가 정의 되었으면 해당 값을 반환하고 정의 되어있지 않으면 지정된 기본값을 반환다.
 function Yvar_check(&$var, $return=''){ function Yvar_check(&$var, $return=''){
- return (isset($var)) ? $var : $return;+        return (isset($var)) ? $var : $return;
 } }
  
-//변수가 정의되지 않았거나 값이 NULL값 이거나, 값이 0, false 일경우 지정된 기본값을 반환합니다.+//변수가 정의되지 않았거나 값이 NULL값 이거나, 값이 0, false 일경우 지정된 기본값을 반환다.
 function Yvar_empty_check(&$var, $return=''){ function Yvar_empty_check(&$var, $return=''){
- return (!empty($var)) ? $var : $return;+        return (!empty($var)) ? $var : $return;
 } }
  
 //http, GET 방식의 소켓연결 //http, GET 방식의 소켓연결
 function Ysockopen($url, $referer='', $accept='*/*', $contenttype='application/x-www-form-urlencoded', $cachecontrol='private', $pragma='no-cache', $connection='close'){ function Ysockopen($url, $referer='', $accept='*/*', $contenttype='application/x-www-form-urlencoded', $cachecontrol='private', $pragma='no-cache', $connection='close'){
- if (!empty($url) && preg_match("`^http://.+`i", $url)) {+        if (!empty($url) && preg_match("`^http://.+`i", $url)) {
  
- $array = parse_url($url); +                $array = parse_url($url); 
- $url_scheme = Yvar_check($array['scheme']); +                $url_scheme = Yvar_check($array['scheme']); 
- $url_server = Yvar_check($array['host']); +                $url_server = Yvar_check($array['host']); 
- $url_path = Yvar_check($array['path']); +                $url_path = Yvar_check($array['path']); 
- $url_query= Yvar_check($array['query']); +                $url_query= Yvar_check($array['query']); 
- $url_port = Yvar_empty_check($array['port'], 80); +                $url_port = Yvar_empty_check($array['port'], 80);
-  +
- $fp = @fsockopen($url_server, $url_port);+
  
-     if (empty($fp)) { +                $fp = @fsockopen($url_server, $url_port);
- return ''; +
-     }+
  
- fputs($fp, "GET " . $url_path . "?" . $url_query . " HTTP/1.0\n"); +            if (empty($fp)) { 
- if (!empty($accept)) fputs($fp, "Accept: " . $accept . "\n")+                        return ''
- if (!empty($contenttype)) fputs($fp, "Content-Type: " . $contenttype . "\n"); +            }
- fputs($fp, "Host: $url_server:$url_port\n")+
- if (!empty($referer)) fputs($fp, "Referer: " . $referer . "\n"); +
- if (!empty($cachecontrol)) fputs($fp, "Cache-control: " . $cachecontrol . "\n"); +
- if (!empty($pragma)) fputs($fp, "Pragma: " . $pragma . "\n"); +
- if (!empty($connection)) fputs($fp, "Connection: " . $connection . "\n\n");+
  
- return $fp; +                fputs($fp, "GET " . $url_path . "?" . $url_query . " HTTP/1.0\n"); 
- } else { +                if (!empty($accept)) fputs($fp, "Accept: " . $accept . "\n"); 
- return ''; +                if (!empty($contenttype)) fputs($fp, "Content-Type: " . $contenttype . "\n"); 
- }+                fputs($fp, "Host: $url_server:$url_port\n"); 
 +                if (!empty($referer)) fputs($fp, "Referer: " . $referer . "\n"); 
 +                if (!empty($cachecontrol)) fputs($fp, "Cache-control: " . $cachecontrol . "\n"); 
 +                if (!empty($pragma)) fputs($fp, "Pragma: " . $pragma . "\n"); 
 +                if (!empty($connection)) fputs($fp, "Connection: " . $connection . "\n\n"); 
 + 
 +                return $fp; 
 +        } else { 
 +                return ''; 
 +        }
 } }
  
 function Ysockclose(&$fp){ function Ysockclose(&$fp){
- if (!empty($fp)) fclose($fp); +        if (!empty($fp)) fclose($fp); 
- return true;+        return true;
 } }
  
 //소켓으로 외부파일 통째로 텍스트로 읽어옴 //소켓으로 외부파일 통째로 텍스트로 읽어옴
 function Yreadfile($url, $referer='', $accept='*/*', $contenttype='application/x-www-form-urlencoded', $cachecontrol='private', $pragma='no-cache', $connection='close') { function Yreadfile($url, $referer='', $accept='*/*', $contenttype='application/x-www-form-urlencoded', $cachecontrol='private', $pragma='no-cache', $connection='close') {
- $fp = Ysockopen($url, $referer, $accept, $contenttype, $cachecontrol, $pragma, $connection); +        $fp = Ysockopen($url, $referer, $accept, $contenttype, $cachecontrol, $pragma, $connection); 
- if (!empty($fp)) { +        if (!empty($fp)) { 
- $text = ''; +                $text = ''; 
- $check_header = false; +                $check_header = false; 
- while (!feof($fp)){ +                while (!feof($fp)){ 
- $temp = fgets($fp, 1024); +                        $temp = fgets($fp, 1024); 
- if ($check_header == false){ +                        if ($check_header == false){ 
- //실제 파일이 아닌 헤더 정보인지 체크 하여 추가하지 않는다. +                                //실제 파일이 아닌 헤더 정보인지 체크 하여 추가하지 않는다. 
- if (preg_match("'^(\r)?\n$'", $temp)) { +                                if (preg_match("'^(\r)?\n$'", $temp)) { 
- $check_header = true; +                                        $check_header = true; 
- continue; +                                        continue; 
- +                                
- } else{ +                        } else{ 
- //헤더 정보가 아닌 경우에만 추가한다. +                                //헤더 정보가 아닌 경우에만 추가한다. 
- $text .= $temp; +                                $text .= $temp; 
- +                        
- +                
- Ysockclose($fp); +                Ysockclose($fp); 
- return $text; +                return $text; 
- } else { +        } else { 
- return ''; +            return ''; 
- }+        }
 } }
  
줄 501: 줄 484:
 </file> </file>
  
-{{tag> torrent p2p 토렌트 유토렌트 utorrent}}+

tech/torrent.1409362747.txt.gz · 마지막으로 수정됨: 2014/08/30 10:39 저자 fe80:4852:64df:b1dd:fe73:ca34:7c28:eae5
CC Attribution-Noncommercial-Share Alike 4.0 International 별도로 명시하지 않을 경우, 이 위키의 내용은 다음 라이선스에 따라 사용할 수 있습니다: CC Attribution-Noncommercial-Share Alike 4.0 International