Ready to get started?Download WordPress


Vote It Up
Problems with voting - Squid (1 post)

  1. multimule
    Posted 2 years ago #

    Hi, I hope you are well.

    The problem:
    Web server administrators, set up a squid (proxy) to speed up the web server.
    After this, the voting system recorded the IPs of the Squid, but not the users IPs.

    The solution:
    Add the following code in the file "compat.php" ...

    $ip = trim($_SERVER['HTTP_X_FORWARDED_FOR']);
    $ip = explode(',', $ip);
    $ip = array_pop($ip);
    $ip = trim($ip);
    $_SERVER['REMOTE_ADDR'] = $ip;

    If you add this code, it will work, even if not using Squid or Proxy...


    Best regards,

    Hugo Velez

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic