Results 1 to 3 of 3
Thread: Detecting Proxy
Threaded View
-
02-05-2008, 10:02 AM #1Web Hosting Master
- Join Date
- Jan 2005
- Location
- UK, London
- Posts
- 764
Detecting Proxy
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';
}
?>:: www.AsuraHosting.com ::