i want to know how some sites and some softwares give information from a given ip address??
i mean does it have a specific algorithm?
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
All the information about who owns what IP who it's registered to, is stored in databases.
IANA assign the IPs to RIRs(regional internet registrars), there's one called ARIN covers america, one called RIPE covers europe.. one for africa e.t.c. they each have databases.
Any website or command or GUI that looks up the IP and gets information about ownership, does a whois, on the database of one of those RIRs.
If you want details of how to access a RIR's database as a programmer, then stackoverflow would be a better place to ask. But as far as the methodology.. no complex algorithm, just returning information from a (RIR's) database.
Run the command "whois":
There are online whois tools, and gui apps for it, as well.
The protocol that whois uses is documented in RFCs, of course. See: