Thread: FIRST Topsite?
View Single Post
  #57   Spotlight this post!  
Unread 05-03-2005, 19:26
lookslikeapuma lookslikeapuma is offline
Team 1039 Member
#1039 (Chief Sealth Robotics)
Team Role: Webmaster
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Seattle, Washington
Posts: 23
lookslikeapuma is on a distinguished road
Send a message via AIM to lookslikeapuma
Re: FIRST Topsite?

well for the "cheating issue" I'd say go ahead and record all ratings via a mysql database, because all a user has to do is disable cookies (easy thing to do on firefox) and they can repeatedly vote (I've tried it, It works , you may deduct a 10 point vote from team1039.org). There are ways of getting the "true IP" of a computer (if they are using a proxy), here's the one that I use (PHP):

function f_GetIP() { // Get the true IP of the user, runs through various methods of getting the IP
if (isSet($_SERVER)) {
if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$realip = $_SERVER["HTTP_X_FORWARDED_FOR"];
} elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) {
$realip = $_SERVER["HTTP_CLIENT_IP"];
} else {
$realip = $_SERVER["REMOTE_ADDR"];
}
} else {
if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) {
$realip = getenv( 'HTTP_X_FORWARDED_FOR' );
} elseif ( getenv( 'HTTP_CLIENT_IP' ) ) {
$realip = getenv( 'HTTP_CLIENT_IP' );
} else {
$realip = getenv( 'REMOTE_ADDR' );
}
}
return $realip; // Return the IP.
}