2
   

using botspotter include

 
 
Reply Tue 3 Feb, 2004 12:27 pm
there's a site called botspotter, pm me for the link, that keeps track of who, what and when spyders come to your site by adding a php include in the page you want monitored. you then go to their site login and check. I tried this with index.php for phpbb and I got this error:

Warning: Failed opening './botspotterphp' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/34/d87885992/htdocs/index.php on line 29

Warning: Cannot add header information - headers already sent by (output started at /homepages/34/d87885992/htdocs/index.php:29) in /homepages/34/d87885992/htdocs/includes/page_header.php on line 724

Warning: Cannot add header information - headers already sent by (output started at /homepages/34/d87885992/htdocs/index.php:29) in /homepages/34/d87885992/htdocs/includes/page_header.php on line 726

Warning: Cannot add header information - headers already sent by (output started at /homepages/34/d87885992/htdocs/index.php:29) in /homepages/34/d87885992/htdocs/includes/page_header.php on line 727


I made this page called botspotter.php:

<?php// Script Date: 09 Jan 2004
// your botspotter login name
$bsName = 'khisanthax';

// change nothing below this line
function getURI() {
global $HTTP_SERVER_VARS;
$url = '/';
if ( !empty($HTTP_SERVER_VARS['PHP_SELF']))
$url = $HTTP_SERVER_VARS['PHP_SELF'];
elseif ( isset ( $HTTP_SERVER_VARS['SCRIPT_URI']) && !empty($HTTP_SERVER_VARS['SCRIPT_URI']))
$url = $HTTP_SERVER_VARS['SCRIPT_URI'];
if ( isset( $HTTP_SERVER_VARS['QUERY_STRING'] ) && $HTTP_SERVER_VARS['QUERY_STRING'] != "")
$url .= '?'.$HTTP_SERVER_VARS['QUERY_STRING'];

return $url;
}//function getURI()

function getPageStatus() {
global $HTTP_SERVER_VARS, $HTTP_ENV_VARS;
if (isset($HTTP_ENV_VARS['REDIRECT_STATUS'])) return $HTTP_ENV_VARS['REDIRECT_STATUS'];
else if (isset($HTTP_SERVER_VARS['REDIRECT_STATUS'])) return $HTTP_SERVER_VARS['REDIRECT_STATUS'];
else return '200';
}//function getPageStatus()
$status = getPageStatus();
$url = 'http://www.pcpropertymanager.com/botspotter/accept.php'
. '?server=' . urlencode( $HTTP_SERVER_VARS['SERVER_NAME'])
. '&uri=' . urlencode( getURI())
. '&agent=' . urlencode( $HTTP_SERVER_VARS['HTTP_USER_AGENT'])
. '&ip=' . urlencode( $HTTP_SERVER_VARS['REMOTE_ADDR'])
. "&account={$bsName}"
. '&status=' . $status;

$fp = @fopen($url, "r") or die ("\n<a href='http://www.pcpropertymanager.com/botspotter/home.php' target='_blank'>Botspotter</a> <a href='{$url}'>disabled</a>\n");
if ($fp != false) {
fpassthru($fp);
fclose($fp);
}

$url = 'http://www.pcpropertymanager.com/botspotter/accref.php'
. '?server=' . urlencode( $HTTP_SERVER_VARS['SERVER_NAME'])
. '&uri=' . urlencode( getURI())
. "&account={$bsName}"
. '&ref=' . urlencode($HTTP_SERVER_VARS['HTTP_REFERER']);

fclose(fopen($url, 'r'));
?>

and added this line to the top of index.php:

include($phpbb_root_path . 'botspotter'.$phpEx);

can anyone tell me what I need to do to make it work right?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 2 • Views: 1,588 • Replies: 8
No top replies

 
Craven de Kere
 
  1  
Reply Tue 3 Feb, 2004 12:33 pm
What you need to do is make it get called in the template as well.

Thing is, I recommend against this. Don't you have a stats program? If so doesn't it track bots?

I recommend awstats.
0 Replies
 
khisanthax
 
  1  
Reply Tue 3 Feb, 2004 12:42 pm
I got it to work, the script started with <php//whater

and it was screwing it up, but I will check out awstats, anything you recommend for me especially with way of tracking, thanks I'll look at that!
0 Replies
 
khisanthax
 
  1  
Reply Tue 3 Feb, 2004 12:45 pm
the only stats I have, I don't use my hosts cause it's garbage I think, is the codecrush ip logger and http referrer mod for phpbb
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 3 Feb, 2004 12:51 pm
Do you have a cpanel host?
0 Replies
 
khisanthax
 
  1  
Reply Tue 3 Feb, 2004 01:11 pm
hmmmmmm, no. I dl'ed the awstats, is that something I can install myself or does the host have to do it?
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 3 Feb, 2004 01:18 pm
I'm not sure, it probably depends on the way the server is configured. Awstats has to access the log files.

You should probably ask your host. I'm not sure how they have your box set up.
0 Replies
 
sarahk
 
  1  
Reply Wed 17 Mar, 2004 12:50 pm
Botspotter Help
Hi khisanthax

I'm sorry that you had trouble with Botspotter, I only just found this forum and this post. Botspotter has a feedback form and I'm happy to help anyone get setup.

Botspotter is a free tool and at the moment I'm still working on it when I can. Over time it will get better and better. The advantages over a visitor hit counter will be in the understanding of how the bots work, what is a bot and what's not etc. Please stick with us, it's going to get interesting.

Sarah
0 Replies
 
Craven de Kere
 
  1  
Reply Wed 17 Mar, 2004 12:59 pm
As I said earlier, I strongly recommend against using Botspotter or any tracking other than server logs.

Server logs track all of this data just as well as anything else. There's no information available to Botspotter that is not available to your server logs.

So any hit counter, tracking etc that requires you to use an include or extra tracking code just unecessarily slows down your site.

You'd be better off looking for a better log intrepreting program.

Why track everything twice? You already have all the info in your server logs, just get a good program to understand them.
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » using botspotter include
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.05 seconds on 04/26/2024 at 05:45:38