I am trying to get user data not from my server.
I have two pages on one I have an SSL certificate and on the other I don't, I am printing data from my computer, on the SSL certificate, it prints port 443 while the one without a certificate prints port 80.
$PORT = $_SERVER['SERVER_PORT'];
The same works with the following code, in SSL it prints proxy while in the other it prints no proxy.
if(!gethostbyaddr(getenv('REMOTE_ADDR'))
|| gethostbyaddr(getenv('REMOTE_ADDR')) == "."
|| !getenv('HTTP_ACCEPT_ENCODING')
|| getenv('HTTP_X_FORWARDED_FOR')
|| getenv('HTTP_X_FORWARDED')
|| getenv('HTTP_FORWARDED_FOR')
|| getenv('HTTP_VIA')
|| getenv('HTTP_FORWARDED')
|| getenv('HTTP_CLIENT_IP')
|| getenv('HTTP_FORWARDED_FOR_IP')
|| getenv('VIA')
|| getenv('X-PROXY-ID')
|| getenv('MT-PROXY-ID')
|| getenv('X-TINYPROXY')
|| getenv('PROXY-AGENT')
|| getenv('X_FORWARDED_FOR')
|| getenv('FORWARDED_FOR')
|| getenv('X_FORWARDED FORWARDED')
|| getenv('HTTP_X_CLUSTER_CLIENT_IP')
|| getenv('CLIENT-IP')
|| getenv('CLIENT_IP')
|| getenv('FORWARDED_FOR_IP')
|| getenv('HTTP_PROXY_CONNECTION')
|| getenv('PROXY_CONNECTION')
|| in_array(getenv('REMOTE_PORT'), array(8080,80,6588,8000,3128,553,554))
|| @fsockopen(getenv('REMOTE_ADDR'), 80, $NUM_ERROR, $CONNECTION_TIME, 0)
|| !getenv('HTTP_CONNECTION')){
echo 'proxy';
} else {
echo 'no proxy';
}
So this is wrong, because I am getting different data, am I using the same computer?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…