WordPress.org

Plugin Directory

Changeset 224668


Ignore:
Timestamp:
04/03/10 03:39:58 (8 years ago)
Author:
rdmenotte
Message:

fixed referring bug

Location:
database-only-visitor-entropy-statistics/tags/2.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • database-only-visitor-entropy-statistics/tags/2.0/doves.php

    r224665 r224668  
    3333 
    3434function doves_add_data() { 
    35     global $wpdb; 
    36      
    37      
    38     if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_ADDR']) === false && strpos($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_NAME']) === false) { 
     35 
     36    $referringhost = parse_url($_SERVER['HTTP_REFERER'],PHP_URL_HOST); 
     37        $visitorip = $_SERVER['REMOTE_ADDR']; 
     38        $myip = $_SERVER['SERVER_ADDR']; 
     39        $myhostname = $_SERVER['SERVER_NAME']; 
     40 
     41        if (strpos($referringhost, $myhostname) === false && strpos($referringhost, $myip) === false) { 
    3942        $myFile = "/var/log/wordpress/visitors.log"; 
    4043        $fh = fopen($myFile, 'a') or die ("can't open file"); 
  • database-only-visitor-entropy-statistics/tags/2.0/readme.txt

    r224665 r224668  
    44Requires at least: 2.0.2 
    55Tested up to: 2.9.2 
    6 Stable: 1.1 
     6Stable: 2.0 
    77 
    88Simple data only visitor statistics plugin. Useful for no frills external reporting. 
Note: See TracChangeset for help on using the changeset viewer.