Hello,
I want to integrate a function on my TS:
Successfully download the NFO and the presentation of the torrent.
I tried it for the codes:
NFO:
PHP Code:
<?php
require('./global.php');
$id = intval(TS_Global('id'));
if (isset($_GET['id']) && !empty($_GET['id']) );
$ready_nfo = mysql_query("SELECT id,nfo FROM ts_nfo WHERE nfo = $id");
$file_name = mysql_query("SELECT name FROM torrents WHERE t.id = '".$id."'");
$filename = "".$id.".nfo";
header("Cache-Control: cache, must-revalidate");
header("Pragma: public");
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=".basename( $filename['name'] ).".nfo");
echo $ready_nfo;
?>
Prez:
PHP Code:
<?php
require('./global.php');
$id = intval(TS_Global('id'));
$descr = isset($_GET['id']);
$ready_descr = sql_query("SELECT * FROM torrents WHERE ".$descr."");
$torrents = mysql_fetch_assoc($ready_descr) ;
$name = isset($_GET['id']);
$file_name = mysql_query("SELECT name FROM torrents WHERE ".$name."");
if(!file_exists($descr)) {
$file_name = "".$name.".txt";
header ('Expires: Tue, 1 Jan 1980 00:00:00 GMT');
header ('Last-Modified: ' . gmdate ('D, d M Y H:i:s') . ' GMT');
header ('Cache-Control: no-store, no-cache, must-revalidate');
header ('Cache-Control: post-check=0, pre-check=0', false);
header ('Pragma: no-cache');
header ('Accept-Ranges: bytes');
header ('Connection: close');
header("Content-type: application/octet-stream");
header( "Content-Disposition: attachment; filename=".basename( $torrents['name'] ).".txt");
echo $ready_descr;
}
?>
Here are two screens for evoking problem
This window opens fine but they are empty and the names of the torrents.
I'm in a TS 7.2 and I have asked for help on the site but to no avail xam no answers .....
If anyone can help me thank you to him
Or tell me where I can find a better source code for the two functions