Page 39 of 86 FirstFirst ... 29373839404149 ... LastLast
Results 381 to 390 of 858
  1. #381
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: User tracking mod

    What does not work with 1.3.8? Do not collect data? Try this:
    Code:
    <?php
    /**
     * user_tracking functions
     *
     * @package user_tracking
     * @copyright Copyright 2004-2009 Andrew Berezin eCommerce-Service.com
     * @copyright Portions Copyright 2005 Petter Norrman
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: user_tracking.php 1.4 13.02.2008 4:18 Andrew Berezin $
     */
    
      function net_match($network, $ip) {
        if (($ip_long = ip2long($ip)) === false) return false;
        // determines if a network in the form of 192.168.17.1/16 or
        // 127.0.0.1/255.255.255.255 or 10.0.0.1 matches a given ip
        $ip_arr = explode('/', $network);
        if (($network_long = ip2long($ip_arr[0])) === false) return false;
        if (!isset($ip_arr[1])) $ip_arr[1] = '255.255.255.255';
        $x = ip2long($ip_arr[1]);
        $mask = long2ip($x) == $ip_arr[1] ? $x : 0xffffffff << (32 - $ip_arr[1]);
        return ($ip_long & $mask) == ($network_long & $mask);
      }
    
      function zen_update_user_tracking() {
        global $db;
    
        $wo_ip_address = (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'Unknown');
        foreach (explode(",", CONFIG_USER_TRACKING_EXCLUDED) as $skip_ip) {
          if ($skip_this_ip = net_match(trim($skip_ip), $wo_ip_address)) {
            break;
          }
        }
        if ($skip_this_ip == true) return;
    
        if (isset($_SESSION['customer_id']) && (int)$_SESSION['customer_id'] > 0) {
          $wo_customer_id = (int)$_SESSION['customer_id'];
          $customer = $db->Execute("SELECT customers_firstname, customers_lastname 
                                    FROM " . TABLE_CUSTOMERS . " 
                                    WHERE customers_id = '" . (int)$_SESSION['customer_id'] . "'");
          $wo_full_name = $customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname'];
        } else {
          $wo_customer_id = 0;
          $wo_full_name = '&yen;' . 'Guest';
        }
    
        if (!isset($spider_flag)) {
          $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
          $spider_flag = false;
          if (zen_not_null($user_agent)) {
            $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
            for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
              if (zen_not_null($spiders[$i])) {
                if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
                  $spider_flag = true;
                  break;
                }
              }
            }
          }
        }
        if ($spider_flag) {
          $wo_full_name = 'BOT ' . trim($spiders[$i]);
        }
    
        $wo_session_id = zen_session_id();
    
        if ($wo_session_id == '') {
          $wo_session_id = gethostbyaddr($wo_ip_address);
        }
    
        $wo_last_page_url = $_SERVER['REQUEST_URI'];
    
        $referer_url = (isset($_SERVER['HTTP_REFERER'])) ? $wo_last_page_url : $_SERVER['HTTP_REFERER'];
    
        global $breadcrumb;
        $page_desc = $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR);
        $page_desc = strip_tags($page_desc);
        $page_desc = str_replace(BREAD_CRUMBS_SEPARATOR . "\n" . 'NAVBAR_TITLE', '', $page_desc); // Fix for TPP
        $page_desc = str_replace(array("\n", '&nbsp;', '  '), array(' '), $page_desc);
        $page_desc = trim($page_desc);
    
        $current_time = time();
    
    //    $db->Execute("ALTER TABLE " . TABLE_USER_TRACKING . " CHANGE page_desc page_desc VARCHAR(254)");
    
        $sql = "INSERT INTO " . TABLE_USER_TRACKING . " (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, referer_url, page_desc) VALUES (:customer_id:, :wo_full_name:, :wo_session_id:, :wo_ip_address:, :current_time:, :current_time:, :wo_last_page_url:, :referer_url:, :page_desc:)";
        $sql = $db->bindVars($sql, ':customer_id:', $wo_customer_id, 'integer');
        $sql = $db->bindVars($sql, ':wo_full_name:', $wo_full_name, 'string');
        $sql = $db->bindVars($sql, ':wo_session_id:', $wo_session_id, 'string');
        $sql = $db->bindVars($sql, ':wo_ip_address:', $wo_ip_address, 'string');
        $sql = $db->bindVars($sql, ':current_time:', $current_time, 'integer');
        $sql = $db->bindVars($sql, ':wo_last_page_url:', $wo_last_page_url, 'string');
        $sql = $db->bindVars($sql, ':referer_url:', $referer_url, 'string');
        $sql = $db->bindVars($sql, ':page_desc:', $page_desc, 'string');
        $db->Execute($sql);
    
      }

  2. #382
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: User tracking mod

    Replace
    $wo_full_name = '&yen;' . 'Guest';
    by
    $wo_full_name = 'Guest';

  3. #383
    Join Date
    Mar 2009
    Posts
    17
    Plugin Contributions
    0

    Default Re: User tracking mod

    Hi everyone,
    I'm running the latest zen cart with the updated security patch and I recently started having a problem with user tracking resulting in a blank page. I loaded the debug php file and the results show: PHP Fatal error: Cannot redeclare geoip_country_code_by_name() in /<site path/<admin>/includes/geoip.inc on line 159. I tried the updated PHP file posted by a_berezin, but this did not resolve my issue. I cannot correlate any changes that I've made to this problem. I re-transferred the user tracking files to my site and overwrote the files already present, but this did not help..... Any idea's what's going on?
    Thanks for your help!

  4. #384
    Join Date
    Mar 2009
    Posts
    17
    Plugin Contributions
    0

    Default Re: User tracking mod

    Quote Originally Posted by abko View Post
    Hi everyone,
    I'm running the latest zen cart with the updated security patch and I recently started having a problem with user tracking resulting in a blank page. I loaded the debug php file and the results show: PHP Fatal error: Cannot redeclare geoip_country_code_by_name() in /<site path/<admin>/includes/geoip.inc on line 159. I tried the updated PHP file posted by a_berezin, but this did not resolve my issue. I cannot correlate any changes that I've made to this problem. I re-transferred the user tracking files to my site and overwrote the files already present, but this did not help..... Any idea's what's going on?
    Thanks for your help!
    Found it! It appears that two functions in the geoip.inc file are now included with PHP, so they were being declared twice. I had to comment out these two functions: geoip_country_code_by_name geoip_country_name_by_name
    Hope this helps someone else.

  5. #385
    Join Date
    Mar 2009
    Posts
    51
    Plugin Contributions
    0

    Default Re: User tracking mod

    Have a site using v 1.38......installed user tracking mod and it does not work. Do not get all the configs to set up and it only tracks the admin logins not any users.

    Anyone have the 1.38 version ?

    Have pm'd boomba but no answer.

    Would like to use this mod but if no support, I'll use super tracker.

    Thanks,
    Martin

  6. #386
    Join Date
    Mar 2009
    Posts
    51
    Plugin Contributions
    0

    Default Re: User tracking mod

    Boy I can see why this mod won't work in v 1.38.

    This thread is dead.

    Thanks for all the help.

  7. #387
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,300
    Plugin Contributions
    1

    Default Re: User tracking mod

    I've just installed this mod on 1.38a with various other mods already installed.

    No problems and all is running smoothly.

  8. #388
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: User tracking mod

    I have it installed on several 1.3.8a without any problems. It is helpful if you can elaborate on what you did to install, other mods you have, the version of user tracking you are using. Usually it is an installation/configuration error. And sometimes it can take more than 1 day to get a response! It sounds like you either forgot to add <?php if (ZEN_CONFIG_USER_TRACKING == 'true') { zen_update_user_tracking(); } ?> to the bottom of includes/template/YOUR_TEMPLATE/common/tpl_footer.php or you added it to the wrong file ie includes/templates/template_default/common/tpl_footer.php or something like that.

    Zen Cart and it's community are the best!!

  9. #389
    Join Date
    Mar 2005
    Posts
    4
    Plugin Contributions
    0

    Default Re: User tracking mod

    Hello,
    Can anybody tell me what is this link that I am keep founding on my user tracking results?
    "Host: host69-173-dynamic.22-79-r.retail.telecomitalia.it " ,
    " Originating URL: /index.php?main_page=http://217.218.225.2:2082/index.html? "
    "Host: 0x57373c9f.nfnqu1.dynamic.dsl.tele.dk " ,
    "Originating URL: /index.php?main_page=http://217.218.225.2:2082/index.html? "
    "Host: 218.186.10.10.cache.maxonline.com.sg " ,
    " Originating URL: /index.php?main_page=http://217.218.225.2:2082/index.html? "
    and every day I find a lot of links like this. The "Host" is from around the world ( Japan, Korea, Singapore, Denmark, United States etc.).
    I followed the link " http://217.218.225.2:2082/index.html?" and is a Cpanel login page.
    Is someone using My SITE? Am I hacked?

  10. #390
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: User tracking mod

    Quote Originally Posted by gabyone View Post
    Hello,
    Can anybody tell me what is this link that I am keep founding on my user tracking results?
    "Host: host69-173-dynamic.22-79-r.retail.telecomitalia.it " ,
    " Originating URL: /index.php?main_page=http://217.218.225.2:2082/index.html? "
    "Host: 0x57373c9f.nfnqu1.dynamic.dsl.tele.dk " ,
    "Originating URL: /index.php?main_page=http://217.218.225.2:2082/index.html? "
    "Host: 218.186.10.10.cache.maxonline.com.sg " ,
    " Originating URL: /index.php?main_page=http://217.218.225.2:2082/index.html? "
    and every day I find a lot of links like this. The "Host" is from around the world ( Japan, Korea, Singapore, Denmark, United States etc.).
    I followed the link " http://217.218.225.2:2082/index.html?" and is a Cpanel login page.
    Is someone using My SITE? Am I hacked?
    Is this your IP address? 217.218.225.2? It looks like something is broken, has it been working fine and suddenly started this behavior? Are they able to get around your site or are they leaving after the one page visit?
    Last edited by lankeeyankee; 21 Aug 2009 at 06:04 PM.

    Zen Cart and it's community are the best!!

 

 
Page 39 of 86 FirstFirst ... 29373839404149 ... LastLast

Similar Threads

  1. User Tracking Mod only shows the Admin Session
    By Griff1324 in forum General Questions
    Replies: 6
    Last Post: 29 May 2008, 10:56 PM
  2. User Tracking Mod issue: repeated Logins: Admin: View Sessions
    By dharma in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 20 Feb 2008, 04:48 AM
  3. Search log mod vs. user tracking
    By ashton0603 in forum General Questions
    Replies: 4
    Last Post: 30 Jan 2008, 08:43 AM
  4. Google Analytics vs User Tracking mod
    By miles in forum General Questions
    Replies: 1
    Last Post: 15 Jun 2007, 10:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR