That's a good question. I'm not sure what is the answer. I'll do some poking around and get back to you if I find an good answer. You should email the people at iPage as they probably could give you help..
Thx for replying.
Is "your ip addy" the only thing I have to change.
Where exactly should I put that.
These are the script changes:.
2) Add the data capture lines to catalog/includes/application_top.php:.
Find:.
// language.
If (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {.
If (!tep_session_is_registered('language')) {.
Tep_session_register('language');.
Tep_session_register('languages_id');.
}.
Include(DIR_WS_CLASSES'language.php');.
$lng = new language($HTTP_GET_VARS['language']);.
If (!$HTTP_GET_VARS['language']) $lng->get_browser_language();.
$language = $lng->language['directory'];.
$languages_id = $lng->language['id'];.
}.
Change to:.
// language.
If (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {.
If (!tep_session_is_registered('language')) {.
Tep_session_register('language');.
Tep_session_register('languages_id');.
}.
Include(DIR_WS_CLASSES'language.php');.
$lng = new language($HTTP_GET_VARS['language']);.
If (!isset($HTTP_GET_VARS['language'])) $lng->get_browser_language();.
$language = $lng->language['directory'];.
$languages_id = $lng->language['id'];.
// Visitors Start.
$b_lang = getenv('HTTP_ACCEPT_LANGUAGE');.
$referer = getenv('HTTP_REFERER');.
if ($referer == '') {.
$referer = 'direct';.
}.
$uri = getenv('REQUEST_URI');.
if ( function_exists('tep_get_ip_address') ) {.
$b_ip = tep_get_ip_address();.
} else {.
$b_ip = getenv('REMOTE_ADDR');.
}.
if ($b_lang == '') {.
$b_lang = 'robot';.
}.
if ($customer_id) {.
$log_id = $customer_id;.
}else{.
$log_id = 0;.
}.
$b_count = '1';.
$ip_count = tep_db_query("select counter FROM "TABLE_VISITORS" where browser_ip = '"$b_ip"' AND browser_language = '"$b_lang"' AND to_days(now()) - to_days(date) < 1");.
if (!tep_db_num_rows($ip_count)) {.
tep_db_query("insert into "TABLE_VISITORS" (date,customers_id,counter,browser_ip,browser_language,language,referer,uri) values (now(),'".$log_id."','".$b_count."','".$b_ip."','".$b_lang."','".$language."','".$referer."','".$uri."')");.
} else {.
$ip_values = tep_db_fetch_array($ip_count);.
$b_count = ($ip_values['counter'] + 1);.
tep_db_query("update "TABLE_VISITORS" set counter = '"$b_count"', date = now() where browser_ip = '"$b_ip"' AND browser_language = '"$b_lang"' AND to_days(now()) - to_days(date) < 1");.
}.
// Visitors End.
}.
2b) Add the following to catalog/login.php just before "// restore cart contents".
//Changes for visitor stats. Add the customer id if known.
$b_lang = getenv('HTTP_ACCEPT_LANGUAGE');.
$b_ip = getenv('REMOTE_ADDR');.
$visitor_query_string = "update visitors set customers_id = '"$customer_id"' where browser_ip = '"$b_ip"' AND browser_language = '"$b_lang"' AND to_days(now()) - to_days(date) < 1";.
//print('<br>'$visitor_query_string'<br>');.
tep_db_query($visitor_query_string);.
//end changes for visitor stats.
2c) Add the following to catalog/create_account.php just before "if (SESSION_RECREATE == 'True') {".
//Changes for visitor stats. Add the customer id if known.
$b_lang = getenv('HTTP_ACCEPT_LANGUAGE');.
$b_ip = getenv('REMOTE_ADDR');.
$visitor_query_string = "update visitors set customers_id = '"(int)$customer_id"' where browser_ip = '"$b_ip"' AND browser_language = '"$b_lang"' AND to_days(now()) - to_days(date) < 1";.
//print('<br>'$visitor_query_string'<br>');.
tep_db_query($visitor_query_string);.
//end changes for visitor stats.
I really apreciate your help..
I haven't got this contrib installed so have not had a chance to test:-.
Http://www.hostingos...com/example.txt.
Let me know how it goes...
This is what it says when I visit it:.
Parse error: parse error in /home/dollward/public_html/catalog/includes/application_top.php on line 301.
Warning: main(DIR_WS_LANGUAGES/FILENAME_DEFAULT): failed to open stream: No such file or directory in /home/dollward/public_html/catalog/index.php on line 33.
Fatal error: main(): Failed opening required 'DIR_WS_LANGUAGES/FILENAME_DEFAULT' (include_path='.:/usr/local/lib/php') in /home/dollward/public_html/catalog/index.php on line 33.
This is what the files look lie as of now:.
The application_top.php:.
// Visitors Start.
$b_lang = getenv('HTTP_ACCEPT_LANGUAGE');.
$referer = getenv('HTTP_REFERER');.
if ($referer == '') {.
$referer = 'direct';.
}.
$uri = getenv('REQUEST_URI');.
if ( function_exists('tep_get_ip_address') ) {.
$b_ip = tep_get_ip_address();.
} else {.
$b_ip = getenv('REMOTE_ADDR');.
}.
if ($b_lang == '') {.
$b_lang = 'robot';.
}.
if ($customer_id) {.
$log_id = $customer_id;.
}else{.
$log_id = 0;.
}.
$b_count = '1';.
//addition!!!!!!!!exclude my ip addy.
if($b_ip != (144.90.8.2).
{.
db query;.
}.
$ip_count = tep_db_query("select counter FROM "TABLE_VISITORS" where browser_ip = '"$b_ip"' AND browser_language = '"$b_lang"' AND to_days(now()) - to_days(date) < 1");.
if (!tep_db_num_rows($ip_count)) {.
tep_db_query("insert into "TABLE_VISITORS" (date,customers_id,counter,browser_ip,browser_language,language,referer,uri) values (now(),'".$log_id."','".$b_count."','".$b_ip."','".$b_lang."','".$language."','".$referer."','".$uri."')");.
} else {.
$ip_values = tep_db_fetch_array($ip_count);.
$b_count = ($ip_values['counter'] + 1);.
tep_db_query("update "TABLE_VISITORS" set counter = '"$b_count"', date = now() where browser_ip = '"$b_ip"' AND browser_language = '"$b_lang"' AND to_days(now()) - to_days(date) < 1");.
}.
// Visitors End.
}.
// visitor traking addition.
The login.php:.
//Changes for visitor stats. Add the customer id if known.
$b_lang = getenv('HTTP_ACCEPT_LANGUAGE');.
$b_ip = getenv('REMOTE_ADDR');.
$visitor_query_string = "update visitors set customers_id = '"$customer_id"' where browser_ip = '"$b_ip"' AND browser_language = '"$b_lang"' AND to_days(now()) - to_days(date) < 1";.
//addition!!!!!!!!exclude my ip addy.
if($b_ip != (144.90.8.2).
{.
db query;.
}.
//print('<br>'$visitor_query_string'<br>');.
tep_db_query($visitor_query_string);.
//end changes for visitor stats.
And the create_account.php:.
//Changes for visitor stats. Add the customer id if known.
$b_lang = getenv('HTTP_ACCEPT_LANGUAGE');.
$b_ip = getenv('REMOTE_ADDR');.
$visitor_query_string = "update visitors set customers_id = '"(int)$customer_id"' where browser_ip = '"$b_ip"' AND browser_language = '"$b_lang"' AND to_days(now()) - to_days(date) < 1";.
//addition!!!!!!!!exclude my ip addy.
if($b_ip != (144.90.8.2).
{.
db query;.
}.
//print('<br>'$visitor_query_string'<br>');.
tep_db_query($visitor_query_string);.
//end changes for visitor stats.
Thx for tryin to help..
I have now added the solution to the contrib..
Http://forums.oscommerce.com/index.php?sho...00entry414731..
Hi I was wonderin if any of you guys would tell me how to exclude my ip out of the reports.
Since I'm stil working on my iPage site I visit it very often and it messes with the stats.
Thanks..
Don't bump..
Anyway try this - put this around any inserts or updates to the visitor table in the contrib:.
If($b_ip != (your ip addy).
{.
Db query;.
}.
This post has been edited by.
Yesudo.
: 26 July 2004, 02:32..

