Page 1 of 1

newbie stats-spider

Posted: Wed Apr 12, 2006 6:55 am
by dal_oscar
Hi,

I am using 'crawler' in get_browser to check if a visitor is a spider/crawler

$isspider=0;
$ua = get_browser(null,TRUE);
if ($ua->crawler == TRUE)
$isspider=1;


And then in my code, I check the value of $isspider to dump the data accordingly. The problem is, that $ua[crawler] always seems to be null. I am also storing the HTTP_USER_AGENT values, and saw using those that an MSNbot just visited my website. But $ua['crawler'] fails to register this (it is always null).

Any ideas?

Thanks.

P.S.- I also posted a related query last friday viewtopic.php?t=46766 and viewtopic.php?t=46937, and have got to this stage now, but am still running into trouble

Posted: Wed Apr 12, 2006 8:18 am
by BDKR
Is it

Code: Select all

$ua['crawler'];
or

Code: Select all

$ua->crawler;
This will make a difference.

Cheers,
BDKR

Posted: Wed Apr 12, 2006 8:27 am
by dal_oscar
currently it is

$ua->crawler

but which one should it be? is that all to it?

Posted: Wed Apr 12, 2006 9:01 am
by BDKR
dal_oscar wrote:currently it is

$ua->crawler

but which one should it be? is that all to it?
It should be $ua->crawler. Dumping $ua['crawler'] won't gain you anything as it won't work.

Are you aware of the difference here?

Posted: Wed Apr 12, 2006 9:03 am
by dal_oscar
no....what's the difference?
thanks.

Posted: Wed Apr 12, 2006 9:14 am
by feyd
Thread locked. This is the exact same "problem" in your last thread. Continue to use it.

Posted: Wed Apr 12, 2006 9:39 am
by BDKR
I feel used. :(