Support » Plugin: FeedStats » [Plugin: FeedStats] Please update feedstats_get_ip()

  • ResolvedPlugin Author Ben


    Hey there, thanks for the great plugins!

    Because of this, I’m glad I can contribute a little. It looks like IP addresses aren’t recorded correctly and lead to lots of redundant entries that aren’t updated (last_time etc.) if you’re behind a reverse proxy.

    I updated feedstats_get_ip() to

    function feedstats_get_ip() {
    	global $_SERVER;  
    	if (isset($_SERVER['REMOTE_ADDR'])) {
    	} else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    		$ip = explode(", ", $ip);
    		$ip = $ip[0];
    	} else if (isset($_SERVER['HTTP_CLIENT_IP'])) {
    	} else {

    Thank you so much!

    – Ben

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: FeedStats] Please update feedstats_get_ip()’ is closed to new replies.