A small tutorial where I describe how to get a Userip with Ajax and making it afterwards available as javascript var. I describe two ways - in a pure php site and how to do it in a htm or html site (with Ajax). Perhaps it may help you, as I see it very often that people have problems with this issue.