Torrent Details
Pirate Bay Archive - 884004 torrents + MySQL db + PHP demo site

Type:Other > Other Rating:9322
Size:19.42 GiB Uploaded:2009-08-13 18:37:03

Download torrent
With this you can run The Pirate Bay yourself! I realize there are some other rips of TPB on here, but this one is the most complete because it comes with every torrent file, a MySQL database, and also a sample PHP site to get you started. (The sample site is far from complete...)

If you have no idea what to do with this, you can download it anyways to help seed it to others who can use it to start new websites based on the Pirate Bay's database once TPB is shutdown. Since this is 20G, please be patient with my seeding and seed back whatever you leech.

I'm pretty sure every torrent uploaded before today is included, the TPB ids range from 3210000 to 5048466 (many IDs were deleted for spam, etc).  The database contains everything except the comments, ratings, thumbnails, type specific data (like artist name for music), and seed/leech counts.

Run this for yourself, your friends, your school, or even the general public! (depending how free your country is and how big your balls are) If you build a nicer PHP site that is compatible with the database, please share it like I've shared with you.

The Pirate Bay Archive 1.0.2009-08-08
By: InfectedPirate  (

- This release requires knowledge of PHP and MySQL and a webserver to run on
- All files are compressed using bzip2
- I am not affiliated with TPB and did not ask permission to make this release
- I'm not responsible for any damage caused by this, use it at your own risk and it's your own fault if you break the law!
- TPB crew has worked hard for many years to spread file sharing around the World. Sure, it's sad that they have to sellout/shutdown but can you really blame them after all they've done and everything they've been through? So, instead of complaining, start your own torrent site!
- Have fun!!

File Contents

database.sql.bz2 - 534M
sha1: d460f7cf338e84062f2b31baaf2d8a7f93507a10
- Dump of the database with three tables: torrent (info about the torrents), pirate (names of the uploaders), type (the category names), torrent_files (file info extracted from the torrent files).
- I used UTF8 for the database (TPB uses UTF8) = the unique ID used on TPB (3210000 ... 5048466 ...)
 torrent.info_hash = official unique id used for torrent files: use to get tracker stats, prevent duplicates, etc.
- Try this after creating a database "tpb":
# bunzip2 < database.sql.bz2 | mysql -uroot -p tpb

torrents.tar.bz2 - 18.8G
sha1: 64294086eab6362eeb5d54b1a77b7c6d4399a5d0
- The torrent files are named 1.torrent, 2.torrent ... the number is the "id" from the torrent table in the database. (See recent.php in htdocs for an example)
- Every torrent includes the TPB trackers which are due to be shutdown soon. For best results you should replace TPB trackers with another free public tracker.

htdocs.tar.bz2 - 70K
sha1: ac1380a90dfb05650909caba27c94a5d1c89c2aa
- A sample website, mostly copied from TPB pages.  Some pages (such as search.php) have already been modified to work with the database, others are just HTML. These scripts are a good starting point but still need a lot of PHP work before they work well.
- The scripts in the 'htdocs' folder assume that the 'php' folder is next to it (../php/) and that the torrent files are stored in ./static/torrents/

spider.tar.bz2 - 6K
sha1: c83f98bde3b61244118606c99d28332d48a925be
- The PHP scripts that I used to spider TPB (could be modified to spider another site, uses php-curl)
 bencode.php = read/write data in torrent files
 tables.sql = create the tables
 batchstart = I divided the workload for concurrency, this script gets the party started
 spider.php = Hope you like messy code! Some is reused from old projects so maybe it contains stuff that isn't even used.
 indextorrents.php = This reads the file info in the torrents and inserts to the database

Sharing == Caring

C2AD EE50 2D72 4A5A FF25
E2BA 18AA B7AD 1899 09D3

Search for this on