Creating a patch for file downloading.

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
greg

Creating a patch for file downloading.

Postby greg » 25 Oct 2005, 19:27

Hey, I just got TTR setup yesterday. It's awesome!

I'm currently hacking at a little patch that will let you download the main link. This is because I view Torrent RSS feeds a lot, sometimes away from home. So I run this on my provided hosting I pay for.

I have a Linux box at home which runs Azureus, and it scans a directly every 5 minutes for torrent files and automagically starts downloading them.

I'm so close to finishing this thing I can taste it :) Problem is I'm horrible at javascript, and PHP i'm just learning as I go ( I do J2EE development so it's very easy to pickup ).

What's the best way for me to get the link over to my home server?

Right now, I basically made a bash cgi script, so I can go

http://home-server.com/downloadTorrent. ... ay.torrent

And this would invoke a download.

However, there appears to be weird issues with encoding.

I'd also like to make this an HttpRequest object, so you could click and forget more or less, but I was having a lot of trouble getting that to work.. my server log at home showed no requests from TTR.

Obviously, I've thought the hell with it, I'll just run TTR on my home server which is also running my bit torrent client, and it could save the file from within PHP using curl or something, but this isn't really the solution I want.

Any tips apprieciated, I can submit the patch after if anyone is interested, it's VERY simple.

Thanks,
Greg

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 26 Oct 2005, 01:35

Right now, I basically made a bash cgi script, so I can go

http://home-server.com/downloadTorrent. ... ay.torrent

And this would invoke a download.

However, there appears to be weird issues with encoding.


Well, first of all, the browser will urlencode any request parameters automatically, you'll have to urldecode them later in your bash script. %20 -> space, stuff like that.

I'd also like to make this an HttpRequest object, so you could click and forget more or less, but I was having a lot of trouble getting that to work.. my server log at home showed no requests from TTR.


As far as I remember, XmlHttpRequest doesn't span hosts because it could be cross-site scripting vulnerability.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 10 guests