![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 33 Pomógł: 0 Dołączył: 20.04.2009 Ostrzeżenie: (0%) ![]() ![]() |
Witam serdecznie,
Od pewnego czasu próbuję stworzyć generatora magnet linków. Tak jak tutaj: http://centrump2p.com/magnet/ Przykładowo posiadam taki info_hash: 8905762b8851be015260b72d92b34cf55bcdb254 // 40 znaków Po generatorze centrump2p.com wygląda on tak: RECXMK4IKG7ACUTAW4WZFM2M6VN43MSU // 32 znaki Dokumentacje: vuze.com ( http://wiki.vuze.com/w/Magnet_link ): The magnet link consists of the prefix magnet:?xt=urn:btih: and the base32() encoded SHA1 of the torrent's info dictionary (known as torrent-hash or infohash). Please note that's the base32-encoding of the torrent-hash's binary (20byte) representation, not the hexadecimal representation. bittorrent.org ( http://bittorrent.org/beps/bep_0009.html ): Is the info-hash hex encoded, for a total of 40 characters. For compatability with existing links in the wild, clients should also support the 32 character base32 [1] encoded info-hash. Próbuję w ten sposób magnet.php
Klasa base32 znajduję się tutaj: http://fremnet.net/article/215/class-base32 No i niestety wygląda to tak, że otrzymuję 64 znakowy ciąg (powinien być 32): HA4TANJXGYZGEOBYGUYWEZJQGE2TENRQMI3TEZBZGJRDGNDDMY2TKYTDMRRDENJU Bardzo proszę o pomoc przy tym kodowaniu, Pozdrawiam. |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 226 Pomógł: 61 Dołączył: 20.08.2010 Ostrzeżenie: (0%) ![]() ![]() |
Sam sobie odpowiedziałeś wklejając kawałek dokumentacji (IMG:style_emoticons/default/smile.gif)
Cytat Please note that's the base32-encoding of the torrent-hash's binary (20byte) representation, not the hexadecimal representation.
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 33 Pomógł: 0 Dołączył: 20.04.2009 Ostrzeżenie: (0%) ![]() ![]() |
oto właśnie chodziło, dziękuję
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 23.08.2025 - 17:40 |