Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   Вопрос по .torrent файлу(php) (https://forum.antichat.xyz/showthread.php?t=189840)

Fantom3D 24.03.2010 10:26

Вопрос по .torrent файлу(php)
 
Каким образом можно с помощью php открыть .torrent файл, добавить туда несколько анонс адресов и закрыть файл? Так, чтобы при открытии уже обработаного файла в uTorrent появлялись старые адреса и новые, которые мы добавили. Помогите :confused: :confused:

Kaimi 24.03.2010 13:16

http://www.phpclasses.org/browse/file/24765.html

Fantom3D 24.03.2010 17:58

Там все очень запутано, та еще и не пашет... выложите, пожалуйста, готовый код.

Kaimi 24.03.2010 18:10

У меня все работает
PHP код:

<?php
require_once 'Torrent.php';
$torrent = new Torrent('sample.torrent');
$torrent->announce('http://alternate-torrent.tracker/annonce');
$torrent->send();
?>


Nelzone 24.03.2010 18:39

как я понел каждый анонс добавит можно
PHP код:


$torrent
->announce('http://alternate-torrent.tracker/annonce');

$torrent->announce('http://rutracker.ru/annonce'); 


Fantom3D 24.03.2010 19:58

Как-бэ ой) Я все с одного файла делал, не прочитал коммент)) Спасибо.

Fantom3D 24.03.2010 22:44

Nelzone

Кстате не пашет, в инструкции написано, что такими 2 способами должно работать :)

PHP код:

$torrent->announce(array('http://torrent.tracker/annonce''http://alternate-torrent.tracker/annonce')); // set tracker(s), it also works with a 'one tracker' array...
$torrent->announce(array(array('http://torrent.tracker/annonce''http://alternate-torrent.tracker/annonce'), 'http://another-torrent.tracker/annonce')); // set tiered trackers 



Время: 02:21