W
W
wawaso2017-04-22 19:10:19
JavaScript
wawaso, 2017-04-22 19:10:19

How do sites work where you can see your history of downloaded torrents?

There is a site iknowwhatyoudownload.com where you can see your history of downloaded torrents. But it does not display absolutely all the torrents that you have downloaded. Which torrents does it add to the list, and which remain unnoticed by this site? And who else besides this site knows the history of downloaded files?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
AlexRas, 2018-05-11
@Salk

This is how it should work, there may be errors, I can not check.

// PHP
$db =&JFactory::getDBO();

$query = 'SELECT * FROM `#__virtuemart_countries` WHERE virtuemart_country_id >= "1" AND virtuemart_country_id <= "30"'; 
$db->setQuery($query); 
$result = $db->loadObjectList(); 

$si = [];
$sk = [];
foreach($result as $row) { 
    $si[$row->virtuemart_country_id] = $row->country_3_code;
    $sk[$row->virtuemart_country_id] = $row->country_3_code;
};


// JS
jQuery(function($) {
    $('body').on('change', '#virtuemart_country_id', function() {
        var ssnull = '',
            s = {
                i: <?php echo json_encode($si) ?>,
                k: <?php echo json_encode($sk) ?>,
            },
            selector = {
                i: $('#inn_field'),
                k: $('#kpp_field'),
            }
            val = $(this).val();

        if (val == 0) {
            selector.i.val($ssnull); 
            selector.k.val($ssnull);

            return;
        }

        $.each(s, function(key, data) {
            $.each(data, function(index, value) {
                if(val == index + 1) {
                    selector[key].val(value);
                }
            });
        });
    });
});

B
Bharata, 2018-05-11
@Bharata

Get rid of jQuery and reduce your code by as much as 100 kb.!

document.getElementById('virtuemart_country_id').onchange = function(e) 
{
...
}

I
Ivan Ivanov, 2018-05-11
@ZZiliST

jQuery(function($) {
$('body').on('change', '#virtuemart_country_id', function() {
    $ssnull = '';
    for (var j = 1; j < 30; j++) {
         window['$s'+j+'_i'] =  '<?php echo $s'+j+'_i ?>';  window['$s'+j+'_k'] = '<?php echo $s'+j+'_k ?>';  
     }

     if($(this).val() == 0) {$('#inn_field').val($ssnull); $('#kpp_field').val($ssnull);}

     for (var x = 1; x < 30; x++) {
        if($(this).val() == x) {$('#inn_field').val( window['$s'+x+'_i']); $('#kpp_field').val( window['$s'+j+'_k']);}
     }   
}
  )});

It seems to be so, but with the if condition it could mess up ...

D
Dmitry, 2017-04-22
@TrueBers

Well, they have written how it works.
Anyone can know what you are downloading. There is no way to hide this, only if you do not use various VPNs and other Torahs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question