Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7780775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:00:48+00:00 2026-06-01T19:00:48+00:00

I’d like to (via PHP) gather the info_hashes currently being downloaded or search the

  • 0

I’d like to (via PHP) gather the info_hashes currently being downloaded or search the DHT.

I’ve seen BTDigg which uses DHT for a search engine and I’d like to do something similar.

Also, after I get the hashes, how do I convert the hash into a torrent so I can get the information such as title etc? (once again through the DHT using PHP).

I tried researching first – Query DHT Server tries to run a DHT Query via PHP, I tried making modifications but I had no luck.
I’ve also tried http://projects-deim.urv.cat/trac/p2pweb/browser/trunk/dht/dht_agg?rev=1 but it gave me several errors and after many fixes it still didn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:00:52+00:00Added an answer on June 1, 2026 at 7:00 pm

    To implement a DHT node, you probably want to read the DHT specification:

    http://www.bittorrent.org/beps/bep_0005.html

    It describes the message format. If you’re not familiar with the underlying DHT, you probably need to read the kademlia paper as well:

    Kademlia: A Peer-to-peer Information System Based on the XOR Metric

    Once you’re up and running on the DHT, and you start seeing info-hashes fly by, you need to implement a bittorrent client. Or at least the bare bones of one in order to make peer connections and talk a subset of the bittorrent protocol, which is described here:

    http://www.bittorrent.org/beps/bep_0003.html

    You mostly just need to be able to make a TCP connection and handshake as if you don’t have anything. Then, to download the metadata (or .torrent file), you need to support the ut_metadata extension, which sits on top of the general extension protocol, described here:

    http://www.bittorrent.org/beps/bep_0010.html

    ut_metadata extension is described here:

    http://www.bittorrent.org/beps/bep_0009.html

    Ones you have metadata for hashes you see, you should essentially be set. Then it’s just a matter of extracting and indexing information such as names, filenames, file sizes, etc. from torrent files (you actually just end up with the info-dict of the torrent files, but that’s the important part).

    Given that this is quite a bit of work all together, you might want to look at using libraries that does this already and somehow pull them in to php. You may for instance want to take a look at libtorrent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.