I am working on a BitTorrent like thing. How can I show the current seeder's IP address and their country flag the way it is shown in BitTorrent client?
There are two largely separate parts - querying the torrent tracker for the seeders IP, and reverse-geocoding the IP addresses to determine the country.
The reverse-geocoding part is a common thing, and easily done. This question lists several options, and this one is similar, but specifically for PHP
The torrent-tracker-querying part is a bit more complicated, due to the various types of torrent trackers. This question explains what you need to do