Problem with DESC
to understand what i wont ! i create a mod to import some torrents ,,
so i need to add the TORRENTFILES from x.torrent to descr
$filelist = $TorrentInfo[8];
$descr = $flex; i have tried [b]$descr = [b]$filelist;[/b] [/b]and [b][b][b]$descr = [/b]$TorrentInfo[8];[/b]
CODE TO ADD FILETORRENTS to SQL [/b]
SO in the sql is adding all files
SO IN TORRENT DETAILS there is no DESCR added
any ideea how to do it ...
to understand what i wont ! i create a mod to import some torrents ,,
so i need to add the TORRENTFILES from x.torrent to descr
$filelist = $TorrentInfo[8];
$descr = $flex; i have tried [b]$descr = [b]$filelist;[/b] [/b]and [b][b][b]$descr = [/b]$TorrentInfo[8];[/b]
CODE TO ADD FILETORRENTS to SQL [/b]
if (count($filelist)) {
foreach ($filelist as $flex) {
$dir = '';
$size = $flex["length"];
$count = count($flex["path"]);
for ($i = 0; $i < $count; $i++) {
if (($i + 1) == $count)
$fname = $dir . $flex["path"][$i];
else
$dir .= $flex["path"][$i] . "/";
}
mysql_query("INSERT INTO `files` (`torrent`, `path`, `filesize`) VALUES($id, " . sqlesc($fname) . ", $size)");
}
} else {
mysql_query("INSERT INTO `files` (`torrent`, `path`, `filesize`) VALUES($id, " . sqlesc($TorrentInfo[3]) . ", $torrentsize)");
}SO in the sql is adding all files
SO IN TORRENT DETAILS there is no DESCR added
any ideea how to do it ...