Are you looking for an IP that will always be in the URL? In other words, if they go to a qualified Domain name, you would not be
able to get the IP?
If this is the case, I would use Regular Expressions to return the first match of:
/[ps]:\/\/([^\/]*\.)$\/?
Not sure on the \/... you might also try:
/[ps]://([^/]*\.)$/?
This should return the following for the following strings:
http://123.123.123.123/here.htm Returns:123.123.123.123
https://mydomain.com/here.htm Returns:mydomain.com
http://this.is.my.domain.name Returns: this.is.my.domain.name
Hope this helps.
"Vanitha" <va*****@agilis.st.com.sg> wrote in message news:15**************************@posting.google.c om...
Hi All,
Is it possible to get the Server IP Address from Javascript
ie., when the user types "http://10.0.0.10/main.htm" in the web
browser, i need to retrive the value of the IP Address(10.0.0.10) from
my client side javascript.