Jump to content

Pure HTML interaction


Shishakli

Recommended Posts

Hi there,

I know people are going to read my question and say "Why do you need to do this? Webui does this for you. There are better ways to do what you're asking", and you're right... of course... but in this specific case I've set up a lot of "dodgy" work arounds to rig a specific solution to very specific problems (Also I like to tinker and screw around)

To get to the point... A user posted this link: http://[ip]:[port]/gui/?list=1

The key part being "?list=1"

The output is pure text, a page that is comma dilimited. This is great. I can take this page and parse it with php to display the progress of my downloads in a pure html page (Without javascript).

My question is... Like this option, are there other options, or URL post/get interactions that are available?

For instance, Can I set a label on a downloading torrent using a simple get or post http method? (Like: http://[ip]:[port]/gui/?setlabel=WoW&id=D21DA2302E8F97D320B72E941AD266583882792F to set that torrent ID to )

Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...

The only way is to just extract the WebUI.zip archive and look at the source code. The files inside this archive is the webspace of the integrated web server in µTorrent. µTorrent retains the server side code (backend) and this archive is the client side code (user interface).

It would of course be very nice to just have the documentation written in a neat way.

I also noticed that µTorrent follows the same data format layout as used by .torrent files, except for it's own purposes. So if you have a parser for this you can use it for parsing the "?list=1" output as well.

Link to comment
Share on other sites

Today, I have just stumbled onto uTorrent's new feature, which is web UI. And my stumbling led me to this forum and, like Shishakli, I too am very pleased to find that finally there is a way to interface uTorrent with scripts and/or programs, using for example the ?list=1 URL post/get interaction. After enough of the stumbling, I decided to register to this forum and post this hopefully usefull bit of info.

I too am planning to interface PHP scripts to uTorrent, mainly to gather statistical data per torrent (which will be very usefull in community trackers, where maintaining high ratios is an advantage), and of course automating tasks based on that statistical data (which will also be very usefull in community trackers as well).

Well, I haven't had the time to look through the WebUI.zip archive to look at the source code, but at least I got most of the data I need. For reference (for those that doesn't have the time to look at the source) here is what I could make out of the data listed in csv format when passing the ?list=1 option to the Web UI.

Sample Output to browser:

{"":"","label": [ ["@CyberStorm",28] ,...] ,"torrents": [ ["3E6D199FFC5ED423EBE7C521E1626E4884AE5ACC",201,"RedHat Enterprise Linux 5-XiSO",3301445230,130,430587904,123355136,286,5,7164,376012,"@CyberStorm",1,1,1,1

,78842,153,2870857326], ...] ,"torrentc": "604566379"}

Parsing Output:

{

"":""

,"label": [

[

"@CyberStorm" - uTorrent Label

,28 - No. of torrents listed

]

,... - Other labels (as ["@CyberStorm",28])

]

,"torrents": [

[

"3E6D199FFC5ED423EBE7C521E1626E4884AE5ACC" - Hash

,201

,"RedHat Enterprise Linux 5-XiSO" - Torrent Name

,3301445230 - Torrent Size (in bytes)

,125 - Percent Done (as 12.5%)

,414302208 - Completed/Downloaded (in bytes)

,119128064 - Uploaded (in bytes)

,287 - Share Ratio (as 0.287)

,21745 - Upload Speed (in bps)

,8694 - Download Speed (in bps)

,387744

,"@CyberStorm" - uTorrent Label

,1

,1

,1 - Seeders Connected)

,1 - Leechers Connected)

,78676

,153 - uTorrent # (and if -1 uTorrent # displays *)

,2887143022 - Remaining(in bytes)

]

,... - Other torrents

]

,"torrentc": "604566379"

}

Feel free to point out any additions and/or corrections if any, here, I will be more than happy to modify my parse tree definitions.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...