Announcement Announcement Module
Collapse
No announcement yet.
capturing client's hostname Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • capturing client's hostname

    I'm having trouble capturing the clients hostname.

    I'm trying to use the HTTPServletRequest.getRemoteHost() method to capture the clients host name. But I always get the dotted ip format which goes like "dyn222.222.222.222.xxxx.xxxx.com" where 222.222.222.222 is some ip address on the xxxx.xxxx.com domain.

    is it possible to capture the clients true hostname?

    FYI, the web application is run on the same LAN network as the computers that i'm trying to capture the hostname from.

  • #2
    The only thing that you actually get from the client is its IP address. The hostname is retrieved via a reverse DNS query. So the hostname you will get depends on the configuration of your DNS. In your case, it seems that the clients get their IP addresses from DHCP. This means that it will be quite hard to associate a "real" hostname with a specific IP ...

    More info :
    http://aplawrence.com/Blog/B961.html
    http://en.wikipedia.org/wiki/Reverse_DNS_lookup

    Comment

    Working...
    X