I wanted to write a piece of code for detecting proxy so i can prevent people voting using proxy for example.

The code looks something like this :

PHP Code:
<?php

if ($_SERVER['HTTP_X_FORWARDED_FOR']
    || 
$_SERVER['HTTP_X_FORWARDED']
    || 
$_SERVER['HTTP_FORWARDED_FOR']
    || 
$_SERVER['HTTP_VIA']
    || 
$_SERVER['HTTP_CLIENT_IP']
    || 
in_array($_SERVER['REMOTE_PORT'], array(8080,6588,8000,3128,553,554)))
{
    echo 
'Proxy detected';
}
else
{
    echo 
'No proxy detected';
}

?>
When i tried it with one of the popular proxy server, e.g. www.hidemyass.com it always says "No proxy detected". Where im i going wrong? What is the best approach in detecting proxy?