Er gibt Mir die
nicht aus! Fehlerneldung lautet:
Was soll ich tun?
Hier der ganze Code (Habe unwichtige sachen entfernt. Das ding ansicht funkioniert er gibt halt nur nichts aus, bzw, ermittelt keine Werte was an der Fehlermeldung liegt. Aber wie beheben?
PHP:
<br>
<br><b>Seeder:</b> <? echo $sha1tor['complete']; ?> (aktuell)
<br><b>Leecher:</b> <? echo $sha1tor['incomplete']; ?> (aktuell)
<br><b>Peers:</b> <? echo $sha1tor['complete'] + $sha1tor['incomplete']; ?> (aktuell)<br>
nicht aus! Fehlerneldung lautet:
Code:
Fatal error: Call to undefined function: sapeerconnect() in /website/popup.php on line 215
Was soll ich tun?
Hier der ganze Code (Habe unwichtige sachen entfernt. Das ding ansicht funkioniert er gibt halt nur nichts aus, bzw, ermittelt keine Werte was an der Fehlermeldung liegt. Aber wie beheben?
PHP:
<?
error_reporting(E_ALL);
require("configx.php");
$dbverbindung = mysql_connect($server, $user, $password);
$dbanfrage = "SELECT * from cm_dl_info WHERE id='".$_GET['id']."'";
$result = mysql_db_query ($dbname, $dbanfrage, $dbverbindung);
echo mysql_error();
while ($ausgabe = mysql_fetch_array ($result)){
?>
<?
function pathurlencode($uri) {
$uri = urlencode($uri);
$uri = str_replace('%3A', ':', $uri);
$uri = str_replace('%2F', '/', $uri);
$uri = str_replace('%26', '&', $uri);
$uri = str_replace('%40', '@', $uri);
$uri = str_replace('%3A', ':', $uri);
$uri = str_replace('%3F', '?', $uri);
$uri = str_replace('%3D', '=', $uri);
$uri = str_replace('%5B', '[', $uri);
$uri = str_replace('%5D', ']', $uri);
return $uri;
}
require("BDecodex.php");
require("BEncodex.php");
$stream = file_get_contents($ausgabe2['link']);
$array = BDecode($stream);
$infovariable = $array["info"];
$infohash = sha1(BEncode($infovariable));
$announce = $array["announce"];
$announce = strtolower($announce);
if (substr($announce, 0, 7) === "http://"){
if ((substr_count($announce, "/announce")) == 1){
$scrape = str_replace('/announce', '/scrape', $announce);
$httpget = "?info_hash=";
$binsha1 = pack("H*", $infohash);
$binsha1s = addslashes($binsha1);
$decoded = BDecode($stream);
//
if (isset($array["announce"])){
$announce = $array["announce"];
// Possibly HtTp://
$announce = strtolower($announce);
if (substr($announce, 0, 7) === "http://"){
if ((substr_count($announce, "/announce")) == 1){
$scrape = str_replace('/announce', '/scrape', $announce);
$httpget = "?info_hash=";
$binsha1 = pack("H*", $infohash);
$binsha1s = addslashes($binsha1);
$fullurl = "$scrape$httpget$binsha1";
$httpurl = pathurlencode($fullurl);
$torrentsize = "";
sapeerconnect($httpurl, $binsha1s, $torrentsize);
} else {
$error = "<BR>Bad Tracker URL for scraping (Maybe trackerless torrent)." ;
echo $error;
}
}
else {
$error = "<BR>Bad Tracker URL for scraping (Maybe trackerless torrent)." ;
echo $error;
}
}
}
}
}
function sapeerconnect($httpurl, $binsha1s, $torrentsize) {
// Code from yabtuc-0.4.1
$fp = fopen($httpurl, "rb");
$stream = "";
if ($fp) {
while( !feof( $fp ) ) {
$stream .= @fread($fp, 128);
}
}
fclose($fp);
if($fp === FALSE){
$error = "<BR>No Response From Tracker. Please Try Again." ;
echo $error;
}
else{
$decoded = BDecode($stream);
if ($decoded["files"] === TRUE) {
$error = "<BR>File not present on tracker (torrent may be dead).";
echo $error;
}
else
{
$files = $decoded['files'];
$sha1tor = $files[$binsha1s];
?>
<br>
<br><b>Seeder:</b> <? echo $sha1tor['complete']; ?> (aktuell)
<br><b>Leecher:</b> <? echo $sha1tor['incomplete']; ?> (aktuell)
<br><b>Peers:</b> <? echo $sha1tor['complete'] + $sha1tor['incomplete']; ?> (aktuell)<br>
<?
require'config2.php';
$seeder = $sha1tor['complete'];
$leecher = $sha1tor['incomplete'];
$dbverbindung = mysql_connect($server, $user, $password);
$dbanfrage = "UPDATE cm_dl_info SET seeder = '$seeder', leecher = '$leecher' WHERE id = '".$_GET['id']."'";
mysql_query($dbanfrage);
}
}
}
}
?>