You can request HTTP_X_FORWARDED_FOR and see if the proxy is willing to give up the IP address.
if (getenv('HTTP_X_FORWARDED_FOR')) {
$ip = getenv('HTTP_X_FORWARD_FOR');
} else {
$ip = getenv('REMOTE_ADDR');
}
Another option, if it's available to you, is to offer a secure connection. Sometimes browsers will surpass the proxy on an https address. This is a method Steve Gibson uses on his security port check for visitors behind a firewall. If that doesn't work, he offers a little executable for them to download which makes sure he is connecting to them and not the firwall.