this mod has been taken from TBdev and modified to work with TTv2.xx
it takes all the ascii stuff out of the nfo and leaves you with the important stuff
nforipper.php
it takes all the ascii stuff out of the nfo and leaves you with the important stuff
nforipper.php
<?
require_once("backend/functions.php");
dbconn(false);
loggedinonly();
stdhead("nforipper");
echo "<h1>NFO ripper</h1>";
if ($action == "rip") {
$parsed_nfo="";
for ($i=0;$i<strlen($nfo);$i++) {
//echo "$nfo[$i] =>".ord($nfo[$i])."<br>";
if ( ((ord($nfo[$i]) >= 32) && (ord($nfo[$i]) <= 127)) || (ord($nfo[$i]) == 228) || (ord($nfo[$i]) == 229) || (ord($nfo[$i]) == 246) || (ord($nfo[$i]) == 197) || (ord($nfo[$i]) == 196) || (ord($nfo[$i]) == 214) ) {
$parsed_nfo.=$nfo[$i];
} elseif (ord($nfo[$i]) == 13) {
$parsed_nfo.="<br>";
}
}
$parsed_nfo = split("<br>",$parsed_nfo);
echo "<table class=embedded><tr><td align=left>";
for ($i=0;$i<count($parsed_nfo);$i++) {
if ( (trim($parsed_nfo[$i]) == "") && (trim($parsed_nfo[$i+1]) == "") ) { } else {
echo trim($parsed_nfo[$i])."<br>";
}
}
echo "</td></tr></table>";
stdfoot();
exit;
}
?>
<form action="nforipper.php" method="post">
<input type="hidden" name="action" value="rip">
<textarea name="nfo" cols=80 rows=25></textarea>
<p><input type=submit value=Rip!>
<? stdfoot(); ?>
to put link in torrent-upload.php
look for
print ("<TR><TD align=right>" . NFO . ": </td><td align=left> <input type=file name=nfo size=50 value=" . $_FILES['nfo']['name'] . "><br />\n</td></tr>");
and add below
print ("<a href=nforipper.php target=_blank><br>Try our new NFO ripper</a><BR>");
