ColdFusion 9: CGI.HTTP_ADDR
The CGI scope that CF returns for each request is extremely useful. Imagine not have this scope and having to use Java or some other trickery to get the information you need, you would probably end up going nuts.
There is one piece of information missing however that I only now I realized wasn’t there. Currently this is no variable within the scope that returns the ip address of the server. The closest variable that the CGI scope has is the SERVER_NAME variable. Supposedly the variable will return the ip address of the server if the server’s name is not resolved. However you can’t tell it to not resolve it in anyway and always return you the ip address, hence it’s not reliable. The only ways currently to get the server’s ip address are to just know it or use the GetHostAddress() UDF that Ben Forta wrote.
With all that blabbing I just did, what I’m trying to say is that the next very of ColdFusion should have some way of getting this information easily. My suggestion would be to add a HTTP_ADDR variable to the CGI scope that will always return the server’s ip address.