Torrent Scraper for Blogs and Forums lets you publish torrent files and magnet links directly inside WordPress blog posts and wpForo forum topics, complete with live seeder, leecher, and download count badges that auto-update every 5 minutes via WP-Cron.
/wp-json/tsbf/v1/ with pagination, filtering, and per-IP rate limiting.When wpForo is active, the plugin adds a torrent attachment panel to the topic editor. Users with the appropriate capability can upload a .torrent file or paste a magnet link directly from the forum topic form. The torrent metadata card is then automatically displayed inside the topic. This integration is optional — the plugin works fully as a standalone blog plugin without wpForo installed.
sockets (UDP tracker scraping), curl (HTTP tracker scraping), mbstring (Bencode decoding), fileinfo (file upload security)After activating, visit Torrent Scraper — Settings — System Check to verify your server meets all requirements.
This plugin contacts external BitTorrent tracker servers to retrieve live seeder, leecher, and completed-download counts for torrents stored in your database. This section documents every external connection this plugin makes: what is sent, what is received, when it happens, how it happens, why it is needed, and which third-party service is involved.
Important: No personal user data is ever transmitted to any external server. No usernames, email addresses, passwords, WordPress session tokens, visitor IP addresses, or any personally identifiable information is sent to tracker servers under any circumstances.
What this service is:
BitTorrent tracker servers are public network services that coordinate peer-to-peer file sharing. When a client queries a tracker using the “scrape” protocol, the tracker reports how many peers are currently seeding (uploading) a file, how many are leeching (downloading) it, and how many times it has been fully downloaded. This plugin uses that information to display live statistics on your WordPress site. The plugin does NOT seed or download any file content. It does NOT join any peer-to-peer swarm.
Which tracker servers are contacted:
The plugin contacts ONLY the tracker announce URLs that are embedded inside each .torrent file that a site administrator uploads through the admin dashboard or wpForo topic form. These tracker URLs are chosen by whoever originally created the torrent file — the plugin reads them from the file and uses them as-is. The plugin does NOT maintain its own hardcoded list of trackers.
Example of a tracker URL that may appear inside an uploaded torrent file:
udp://tracker.example.com/announce
When does this happen:
1. Immediately after upload — When a site administrator uploads a .torrent file or submits a magnet link, the plugin immediately sends one scrape request per tracker URL embedded in the torrent to populate the initial seeder/leecher statistics.
2. Every 5 minutes via WP-Cron — The plugin schedules a recurring background job (WordPress WP-Cron hook: tsbf_run_scheduler) that runs every 5 minutes and sends scrape requests for all active torrents in the database. This keeps statistics up to date automatically. This can be disabled via Settings — Integrations — Automatic Scraper.
3. Manual refresh — When a site administrator clicks the “Reload” button next to a torrent in the admin dashboard, the plugin immediately sends a fresh scrape request for that torrent.
How it works — HTTP Trackers (BitTorrent BEP 48 Scrape Convention):
What is sent (outbound):
An HTTP GET request is sent to the tracker’s scrape URL. The request contains:
– The torrent’s info hash: a 20-byte SHA-1 hash of the torrent file’s “info” dictionary, URL-percent-encoded. This is a mathematical identifier for the torrent and does not contain any personal data or file content.
– Standard HTTP request headers automatically included by WordPress’s built-in wp_remote_get() function, including a User-Agent string identifying the WordPress HTTP client.
Nothing else is sent. No user data. No file content. No authentication credentials.
What is received (inbound):
The tracker responds with a bencoded binary dictionary. The plugin decodes this response and extracts:
– complete: An integer representing the current number of seeders (peers who have the complete file and are sharing it).
– incomplete: An integer representing the current number of leechers (peers who are actively downloading the file).
– downloaded: An integer representing the total number of times the complete file has been successfully downloaded from the swarm since the tracker began counting.
These three numbers are public, aggregate statistics. They do not identify any individual user. The plugin stores these three values in its own database table ({wordpress_prefix}tsbf_torrent_statistics) alongside a timestamp.
No other data from the HTTP response body is stored or used. HTTP response headers (such as cache-control or content-type) are used only to process the response and are not stored.
How it works — UDP Trackers (BitTorrent BEP 15 UDP Tracker Protocol):
What is sent (outbound):
UDP tracker communication follows a two-step handshake:
Step 1 — Connect Request (16 bytes):
– connection_id: fixed protocol magic constant 0x41727101980 (publicly defined by the BitTorrent protocol specification)
– action: integer 0 (meaning “connect”)
– transaction_id: a randomly generated 32-bit integer used to match this request to its response; discarded after use; never stored
Step 2 — Scrape Request (sent after receiving a connection token):
– connection_id: a temporary token issued by the tracker (valid for approximately 2 minutes; used only to send this request; never stored after the request completes)
– action: integer 2 (meaning “scrape”)
– transaction_id: a new randomly generated 32-bit integer; discarded after use
– info_hash: the 20-byte raw binary SHA-1 info hash of the torrent
Side effect of network connection: Because UDP is connectionless, the tracker server will see your web server’s outbound IP address as the network source of the UDP packets. This is an unavoidable, standard side-effect of any internet connection and is equivalent to visiting any website. The plugin does not attempt to mask or spoof this.
Nothing else is sent. No user data. No file content.
What is received (inbound):
The tracker responds with a UDP scrape response packet. The plugin decodes this response and extracts:
– seeders: Current number of peers with the complete file.
– completed: Total number of successful complete downloads recorded by this tracker.
– leechers: Current number of peers still downloading the file.
These three integers are stored in the plugin’s database ({wordpress_prefix}tsbf_torrent_statistics) alongside a timestamp. No other data from the UDP response is stored or used. The connection token and transaction ID are discarded immediately after the response is processed.
Why this is needed:
Without querying the tracker, the plugin has no way to display live seeder and leecher counts. These statistics are the core value of the plugin — they allow site visitors to see at a glance whether a torrent is well-seeded before downloading it. The scrape protocol is the only standardized, publicly available mechanism for retrieving this data from BitTorrent trackers.
Third-party tracker responsibility:
The plugin has no control over which trackers are embedded inside .torrent files uploaded by site administrators. Each tracker is a third-party service with its own policies. Site administrators are responsible for reviewing the tracker URLs embedded in the torrent files they upload. The plugin only sends the torrent’s info hash to each tracker — it does not send any personal data.
Connection
Destination
Trigger
Data Sent
Data Received
Stored
HTTP Tracker Scrape
Tracker URLs inside .torrent files
Upload, WP-Cron every 5 min, manual reload
Info hash (hex string)
Seeders, leechers, completed (3 integers)
Yes — in plugin database
UDP Tracker Scrape
Tracker URLs inside .torrent files
Upload, WP-Cron every 5 min, manual reload
Info hash (20 raw bytes)
Seeders, completed, leechers (3 integers)
Yes — in plugin database
.torrent files that administrators choose to upload. Reviewing those tracker URLs before uploading is the site owner’s responsibility.[tsbf_torrent id="123"] — Torrent info card (name, size, file count, stats)[tsbf_torrent_stats id="123"] — Seeder / leecher / completed badges only[tsbf_torrent_files id="123"] — File count and total size table[tsbf_magnet id="123"] — Magnet link button[tsbf_torrent_list category="movies" limit="20" orderby="seeders"] — Sortable torrent table[tsbf_global_stats] — Network-wide aggregate stats widget[tsbf_user_torrents user_id="0" limit="20"] — Torrents uploaded by a user[tsbf_torrent_browse] — Full browsable torrent listing page