Sometimes people use a proxy to mask their real IP address. I don't want this. I want to restrict that user to access my website.
I have build a website in PHP.
Sometimes people use a proxy to mask their real IP address. I don't want this. I want to restrict that user to access my website.
I have build a website in PHP.
You can block proxies using " HTTP HEADERS "
function shapeSpace_block_proxy_visits() {
$headers = array('CLIENT_IP','FORWARDED','FORWARDED_FOR','FORWARDED_FOR_IP','VIA','X_FORWARDED','X_FORWARDED_FOR','HTTP_CLIENT_IP','HTTP_FORWARDED','HTTP_FORWARDED_FOR','HTTP_FORWARDED_FOR_IP','HTTP_PROXY_CONNECTION','HTTP_VIA','HTTP_X_FORWARDED','HTTP_X_FORWARDED_FOR');
foreach ($headers as $header){
if (isset($_SERVER[$header])) {
die('Proxy access not allowed.');
}
}
}