Forum Moderators: coopster
I was looking at MetaCafe the other day and their producer rewards program and they pay out based on how many times a video is viewed by unique users (otherwise you could just play your own video all day and get paid). What I'm wondering is how this is done, not just with video, but with pageviews in general. My instincts say that you track IP addresses, but I'm pretty sure these can be spoofed, changed, hidden, etc. So if anyone knows the best way in which to detect pageview fraud could you please explain? Thanks so much!
Alex
P.S. I know this doesn't seem like a PHP question, but if I were to code something like this it would be in PHP / MySQL.
<?
// display real IP
function visitorIP() {
$ipParts = explode(".", $_SERVER['REMOTE_ADDR']);
if ($ipParts[0] == "165" && $ipParts[1] == "21") {
if (getenv("HTTP_CLIENT_IP")) {
$ip = getenv("HTTP_CLIENT_IP");
} elseif (getenv("HTTP_X_FORWARDED_FOR")) {
$ip = getenv("HTTP_X_FORWARDED_FOR");
} elseif (getenv("REMOTE_ADDR")) {
$ip = getenv("REMOTE_ADDR");
}
} else {
return $_SERVER['REMOTE_ADDR'];
}
return $ip;
} ?>