1

I am building a Flex application which communicates with a Java server using BlazeDS.

What would be the best way to go about making the server aware of the client's hostname?

Thanks.

user422928
  • 85
  • 1
  • 5

1 Answers1

1

You can't determine the client's hostname from within Flex and it's not possible with JavaScript either. However, you can try to lookup the hostname on the server side using a reverse DNS lookup.

First, you'll need to determine the client's IP address. Take a look at "Can I get the client's IP address in an LCDS service call?" for an example on how to do it in BlazeDS.

In order to get the hostname you need to execute a reverse DNS lookup for the IP address. Please keep in mind that not every IP address has a hostname that can be determined throug reverse DNS lookups.

Community
  • 1
  • 1
Gerhard Schlager
  • 3,155
  • 1
  • 31
  • 53