Update MSN Bot detection

Hello,

I think Msn Bot have new IP and actually the bot is detected like a visitor on the stats.

Exemple of the IP concerned :

207.46.204.214
207.46.199.28
207.46.12.116
etc etc

All the time IP is 207.46.xxx.xxx.

This has been reported and fixed in http://dev.piwik.org/trac/ticket/1238

The change is here: http://dev.piwik.org/trac/changeset/1993

This will be included in the upcoming 0.6 release.

About this patch why use preg_match ? The better way for analyse that information is stripos (Or strpos) function, stripos have better performance than preg_match no ? I think so that is a better way for writte this :

if (strpos($dotIp, '65.55')  === 0                   // Live/Bing 
                                    || strpos($dotIp,'207.46') === 0     // MSN 
                                    || strpos($ua,'Googlebot') !== false)      // Googlebot

Is just a proposition, I think that is a better way. Other question, it haven’t other bot ? Yahoo bot, Ask bot etc etc ?

So ok, I have other problem, I have see whith a web site that “Google Video” is detected like a Web Site but in my opinion it must be on Search Engine statistic no ?

Thanks for your reply

Good point about strpos. I’ll change that. Note: it’s not a significant optimization in this context though.

This code is only for “smartbots”… bots that behave like browsers and execute the javascript tracking code. The majority aren’t, and thus, already excluded.

re: Google Video and other search engines. Feel free to submit a patch for core/DataFiles/SearchEngines.php

[quote=vipsoft @ Mar 26 2010, 02:15 PM) <{POST_SNAPBACK}>

Good point about strpos. I’ll change that. Note: it’s not a significant optimization in this context though.

Yes of course not in this context but it is a practice to take style_emoticons/<#EMO_DIR#>/wink.gif Some little optimization give a big optimization at the end and good practices avoid the bad surprise style_emoticons/<#EMO_DIR#>/rolleyes.gif

QUOTE (vipsoft @ Mar 26 2010, 02:15 PM]re: Google Video and other search engines. Feel free to submit a patch for core/DataFiles/SearchEngines.php[/quote]

It was a question to know if it were one forgets or if it were desired style_emoticons/<#EMO_DIR#>/wink.gif So why not I can view at this when I would have 5 minutes style_emoticons/<#EMO_DIR#>/laugh.gif

NB: Piwik Team is a French Team or not ?

an international team! http://piwik.org/the-piwik-team/