I trying to write a small modification as a MOD to my vbulletin forum's attachment type "torrent" to display Seed & Peers when user upload a torrent file
so atleast others can see whether that torrent is alive anot, before downloading.
But I do think that the script runs by itself cronjob at certain time
and fetch the scrape result to mysql..
the torrent normally is from any random tracker.
i failed to write the complete code for my own usage, as it might be beyond my limits.
i try using PEAR bittorrent class, but i failed again how to use it
astlast i found a very simple script that works
by manual excecute a single torrent
, that i think i could changed alittle and make it works
but the script is wriiten in a new fashion way that i don't know how to modify even abit of it, it is all written without <?php i failed to correct it, and lastly i don't know how to array so it exceute more than 1 file
<?php
include "lib/torrent.php";
include "lib/tracker.php";
$torrent = new Torrent("attachment\\4\\403.attach");
$tracker = new Tracker($torrent->announce);
$tracker->scrape($torrent);
?>
<h1><?=$torrent->name; ?></h1>
<p>
<? if(isset($torrent->files)): ?>
<? foreach($torrent->files as $file): ?>
<?=$file->name; ?><br>
<? endforeach; ?>
<? endif; ?>
</p>
<p>
<b>Seeds:</b> <?=$tracker->seeds; ?><br>
<b>Leeches:</b> <?=$tracker->leeches; ?><br>
<b>Total Size:</b> <?=sprintf("%01.2f",$torrent->totalSize / 1073741824); ?><br>
</p>
can someone guide me along?
for doing below togther
[INDENT]attachment\4\401.attach
attachment\4\402.attach
attachment\4\403.attach[/INDENT]
and correct <?= to something better?
thanks~