The server IP address is static - or it should be - meaning it never changes. If it does, then the DNS lookup that converts the URL "www.MyDomain.com" to an IP address would not find the site.
It's complicated, but when the user requests a URL from the browser, the following things happen:
The browser asks the OS for server IP address.
The OS does a DNS lookup and returns the IP address to the browser.
The browser creates a TCP connection to server, and sends an HHTP request via the TCP connection.
The browser receives HTTP response and process it (authorization errors, 404's and suchlike are handled here)
The browser renders response as a page.
All of this uses the IP address, not the URL once the DNS lookup is complete.
You can get the server IP address, that's simple: the
FillInDetails
method shown here will do it from a server as easily as from a client:
Using IP based Geolocation - and why it's pretty much useless.[
^]
But it won't change!