With this page we hope to answer questions you might have. If you cannot find a desired answer here please do not hesitate to contact us.
1. Some questions answered ...
So how does youtorrent really work ?
As u can see youtorrent uses some cool js scripts to create sortable tables. The js actually gets xml content from php scripts which we will call "backends".
The backends make queries to some database server with the prefered user search string and they return Array results. In our case we will make it simpler , without a database.
Thats right ! You wont be needing a large database to use this source.
So let me explain how the js works.
The js gets the site id that is stored in a cookie ( for the "advanced options" Chapter 2 ) and makes a xml request to the backend like this :
http://www.youtorrent3.com/get.php?site=11&string=1000
Where the site variable is the site ID and the string is the SEARCH string.
Then the js parses all the collected data and makes a sortable js table which you can see on http://youtorrent3.com
In our case we will use the ready backend on http://youtorrent3.com using our local relay ( php curl script which will catch remote content ) because security in browsers doesnt allow us to use a remote xml http:// request
2. How are the advanced options working ?
Using a cookie to store the user preferences we can collect which sites the user wants to search.
3. The files
At that point you already know what the scripts are doing and how are they doing it.
Lets separate the files on 3 parts : PHP , JS , Images
3.1 The PHP
For using this clone ull be needing a mod_curl enabled in your php. Why am i using curl ? Because its the fastest.
engines.php -> The advanced options ajax page.
faq.php -> The faq page.
footer.php -> The footer ( The footer. Put your Google Analytics code or any counter code in here. )
get.php -> The "relay backend" ( The script that will make remote connections to youtorrent3.com to get content )
index.php -> The index page.
privacy.php -> Privacy policy page.
search.php -> The search page.
setengines.php -> The page that will set cookie upon user choise of which torrent engines to search.
terms.php -> The terms page.
PS1 : Dont forget that work is coded in 1 hour so dont wonder why some code is strange or looks lame.
PS2 : There is a XSS in search.php which is left on purpose , u can fix it by using htmlentities() if u want
3.2 The JS
The js scripts are in two parts -> /scripts/ and /i/ . The /scripts part are the real js scripts which will handle requests / sorting etc and the /i part are the js scripts that will handle looks / bars / etc
/scripts/1.js -> The full js script
/scripts/2.js -> The xml check script
/i/ajax.js -> The advanced options script
/i/browser_detect.js -> Browser detection script
/i/button.js -> Toolbar js button
3.3 The images
All the images are located in /i
For creating the logo i used http://creatr.cc/creatr/
4.0 The license
This work is licensed under Creative Commons Attribution-Share Alike 2.5
http://creativecommons.org/licenses/by-sa/2.5/bg/
You can distribute it free. Use it free even for commercial purposes but you have to share the modifications.
5.0 Contacts & Support
If you have any problems with installation or etc. Please feel free to contact me - hristov@clubs.bg ( Aleksander Hristov )
6.0 The source
Current version is 0.1
Download here
Quick Fixes :
bug 1. returns results twice : get http://youtorrent3.com/scripts/3.js and put it instead of 2.js (this is a temporary fix)
7.0 Legal threats - inspired by thepiratebay ( yes i know its quite strange that an open source project gets illegal threats )
7.1 Now torrents Legal threat ( includes threat for physical voilance ) - Last updated 27.04.2008 11:23 GMT+2
8.0 Backend updates & General updates
For now piratebay , mininova, torrentreactor, torrentz , btjunkie and sumotorrent backends are ready
For notifications please join our Google Group
9.0 Reviews , comments , etc.
10.0 Donations for support and development ( if you like this app you may consider donating some cash for servers etc. )
How to create a ready youtorrent clone in 1 hour
