This site uploads .torrent files, downloads, opens magnet, takes seeds, leechers, etc., however it is VERY SLOW , it takes about 15 seconds to open. >
What can I do to reduce this time?
if($sql = mysqli_query($coneccao, "SELECT * FROM arquivos_downloads WHERE nome LIKE '%$palavra_chave%' ORDER BY id DESC"))
{
while($linha = mysqli_fetch_array($sql))
{
if($i == $linha['id'] || $i != $linha['id'])
{
$arq = $linha['nome'];
$arq_title = $arq;
$arq_nome = substr($linha['nome'], 0, 50);
$arq_nome = str_replace("_", " ", $arq_nome);
for($icont = 0; $icont <= 100; $icont++)
{
$arq_nome = str_replace("[".$icont."]", "", $arq_nome);
$arq_title = str_replace("[".$icont."]", "", $arq_title);
}
error_reporting(E_STRICT);
ini_set('user_agent', 'PHP');
$torrent = new Torrent("Uploads/".$arq.".torrent");
$torrentHash = $torrent->hash_info();
$SeedsLeechs = obterSeedLeech($torrentHash);
$SeedsLeechs = json_decode($SeedsLeechs);
if (is_array($SeedsLeechs))
{
foreach($SeedsLeechs as $anuncios)
{
$seeds = $seeds + $anuncios->NUM_SEEDERS;
$leechers = $leechers + $anuncios->NUM_LEECHERS;
}
}
?>
//AQUI TEM UM MONTE DE DIV QUE NÃO ATRAPALHA
<?
}
$seeds = 0;
$leechers = 0;
}
}
?>