add two functions: get_real_ip and get_ipinfo,pull out of the [message] function