New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Bittorrent usage via the command line or an API

A collection of tips on howto tweak your Bubba.
Post Reply
wmnelis
Posts: 8
Joined: 21 Jun 2007, 10:30

Bittorrent usage via the command line or an API

Post by wmnelis »

I am wondering if anyone knows how to use the bittorrent capabilities of the Bubba server via either the command line or an API (if there is one). I would like to create a browser plugin that will automatically add torrent files into the download list.

Any ideas?
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

Hi,

We actually have this feature quite high on our wanted feature list. Only lack of time has stopped us from doing this :( It would be quite easy to implement this as a firefox plugin or perhaps even as a greasemonkey script.

But to provide some info on how this could be done. I think the easiest way to talk to the download manager is by doing regular http posts to the scripts.

You have to do two things to get this working.

First you have to authenticate yourself. This is simplest done by posting to say index.php with the parameters uid set to your username, passwd set to your password and submit set to anything you like. Depending on how you do this you might have to collect the cookie, PHPSESSID, that gets sent here.

Then to add a download do a post, with the cookie you got when logging in provided, to the script downloads.php with the parameters add_download set to "Add", url set to the url that you want to download, uuid to a guaranteed unique identifier prefixed with the string "ftd".

Then to log out, do a post to index.php with the parameter logout set to anything.

A few example using wget. Every example should be entered on one line.

Login:

Code: Select all

wget -o /dev/null  --no-check-certificate --keep-session-cookies --save-cookies cookies.txt --post-data='submit=yes&uid=myusername&passwd=mypassword'  https://bubba/web-admin/index.php
Add download:

Code: Select all

wget -o /dev/null --no-check-certificate --load-cookies cookies.txt --post-data='add_download=Add&uuid=ftd46d7d30bc6a1f&url=http://update.excito.net/install/minimal/bubba.img' https://bubba/web-admin/downloads.php
Log out:

Code: Select all

wget -o /dev/null --no-check-certificate --load-cookies cookies.txt --post-data='logout=yes' https://bubba/web-admin/index.php
/Tor
Co-founder OpenProducts and Ex Excito Developer
nb000
Posts: 20
Joined: 29 May 2008, 14:40

bittorent using php and mysql

Post by nb000 »

There is a bittorrent client, that runs over web
using only PHP any MYSQL.
It is called TorrentFlux.
I will try to install it soon, and see if it works ;-)
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

nb000 and others of course,

Torrentflux on bubba howto and dont miss Bubbamon

/Tor
Co-founder OpenProducts and Ex Excito Developer
Post Reply