Just implement the whois protocol http://tools.ietf.org/html/rfc3912
You receive a request, you view it in your database and send your response. It. Take a look at an example:
open TCP ---- (SYN) ------------------------------>
<---- (SYN+ACK) -------------------------
send query ---- "Smith<CR><LF>" -------------------->
get answer <---- "Info about Smith<CR><LF>" ---------
<---- "More info about Smith<CR><LF>" ----
close <---- (FIN) ------------------------------
----- (FIN) ----------------------------->
How to create your own database, it depends on what information you want to provide.
source
share