Thread: help plz
View Single Post
  #17  
Old 8th February 2009, 11:57
hack346 hack346 is offline
Banned
 
Join Date: Mar 2008
Turkey
Posts: 80
Default
3 sugestions:

1.

find :
Code:
function torrent_scrape_url($scrape, $hash) {
    $ch = curl_init();
    $timeout = 5;
    curl_setopt ($ch, CURLOPT_URL, $scrape.'?info_hash='.escape_url($hash));
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $fp = curl_exec($ch);
    curl_close($ch);

    $ret = array();
    if(!$fp) {
        $ret['seeds'] = -1;
        $ret['peers'] = -1;
    }else{
        $stats = BDecode($fp);
        $binhash = addslashes(pack("H*", $hash));
        $seeds = $stats['files'][$binhash]['complete'];
        $peers = $stats['files'][$binhash]['incomplete'];
        $downloaded = $stats['files'][$binhash]['downloaded'];
        $ret['seeds'] = $seeds;
        $ret['peers'] = $peers;
        $ret['downloaded'] = $downloaded;
    }
    return $ret;
}
replace with:
Code:
function torrent_scrape_url($scrape, $hash) {
	ini_set('default_socket_timeout',10); 
	@$fp = file_get_contents($scrape.'?info_hash='.escape_url($hash));
	$ret = array();
	if(!$fp) {
		$ret['seeds'] = -1;
		$ret['peers'] = -1;
	}else{
		$stats = BDecode($fp);
		$binhash = addslashes(pack("H*", $hash));
		$seeds = $stats['files'][$binhash]['complete'];
		$peers = $stats['files'][$binhash]['incomplete'];
		$downloaded = $stats['files'][$binhash]['downloaded'];
		$ret['seeds'] = $seeds;
		$ret['peers'] = $peers;
		$ret['downloaded'] = $downloaded;
	}
	return $ret;
}


2. Change your f*****g hosting
3. Change this f*****g source (h-tracker will never work on free hosting server)
Reply With Quote