Changed the function to get real IP.