Hey,
Here is my problem. I want to send GET request to server.
This is example:
GET http://some.torrent.tracker/announce.php?info_hash=c%97%91%C5jG%951%BE%C7M%F9%BFa%03%F2%2C%ED%EE%0F& peer_id=S588-----gqQ8TqDeqaY&port=6882&uploaded=0&downloaded=0&left=753690875&event=started
But info_hash part is always different. This is what I want to do:
Convert:
db8babd3f3662166ee9019e29fd7345af8b2b59a
to:
%db%8b%ab%d3%f3f%21f%ee%90%19%e2%9f%d74Z%f8%b2%b5%9a
I found in url below, so I have to encode it using RFC1738 standard.
http://wiki.theory.org/BitTorrentSpecification#Tracker_HTTP.2FHTTPS_Protocol
I found one module, which should do what I am trying to do, but I am not sure how to use it (I have compiled it already, just don't know how to use). Here is url:
http://search.cpan.org/~davidnico/Tie-UrlEncoder-0.01/UrlEncoder.pm
I would really appreciate for every solution how to encode one hash to other.
Regards,
Jerzy.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.