There are ways of doing it in javascript, but they are not recommended and are not very reliable. To be honest, I think OPs best bet is to use some sort of web widget.
I know this is quite an old thread, but I wonder If you understood the question right? You suggest that someone types in his/her IP Address, but I think the intention of the question was how to get the IP address from people visiting the site without them entering the actual address