Detecting IP number of user

Is it possible to detect the IP number via flash, java, php, whatever, and send the information to flash?