Je moet ingelogd zijn om te stemmen.
<?php function ip() { if(getenv("HTTP_X_FORWARDED_FOR")) { $IPadres = getenv("HTTP_X_FORWARDED_FOR"); } elseif(getenv("HTTP_CLIENT_IP")) { $IPadres = getenv("HTTP_CLIENT_IP"); } else { $IPadres = $_SERVER["REMOTE_ADDR"]; } return $IPadres; } ?> <?php include "config.php"; $ip=ip(); $id=$_GET['game']; $query="UPDATE games SET IP='$ip' WHERE id='$id'"; mysql_query($query) or die(mysql_error()); ?>
<?phpfunction ip() { if(getenv("HTTP_X_FORWARDED_FOR")) { $IPadres = getenv("HTTP_X_FORWARDED_FOR"); } elseif(getenv("HTTP_CLIENT_IP")) { $IPadres = getenv("HTTP_CLIENT_IP"); } else { $IPadres = $_SERVER["REMOTE_ADDR"]; } return $IPadres;}?><?phpinclude "config.php";$ip=ip();$id=$_GET['game']; $query="UPDATE games SET IP='$ip' WHERE id='$id'";mysql_query($query) or die(mysql_error());?>