3

Greetings all,

I would very much like to determine the IP# of a domain from client script.

It's for use in a testing application to determine whether or not a certain domain is set to a QA address as opposed to the address live on the . The testing machine will have it's host file set to resolve a domain to the QA address.

Pinging from the server won't help since the server is getting the public DNS address.

Is this possible in JavaScript? Maybe a Flash could do the trick?

Tim W.
  • 371
  • 4
  • 13

1 Answers1

1

Have a look at Smart IP Api. Seems to do everything you're looking for and has some simple tutorials.

Dead account
  • 19,587
  • 13
  • 52
  • 82
  • A quick look on my part but I don't think it does what I need. I need to look at the domain from the client and determine the IP# of the domain that the client is seeing. For instance, if the user has set their host file to resolve a domain to an IP address other than the publicly resolved IP, I want to know it. But thanks for this link, looks really handy great for other things. – Tim W. Mar 26 '10 at 13:54
  • This will give you the IP in the browser. I would ~strongly~ recommend against making server side decisions based on information from the clients browser. What if I hack the Javascript locally and pretend Im in your QA team while on live? – Dead account Mar 26 '10 at 14:37
  • Hi, I guess I'm being unclear, sorry. I don't plan on doing any server-side decisioning based on the client code. Everything based on the IP will only happen in the client. Thanks for your response! – Tim W. Mar 26 '10 at 14:59