Changeset 1285

Show
Ignore:
Timestamp:
08/12/08 14:58:10 (4 months ago)
Author:
_ck_
Message:

bot list update/fix, msn stealth added, no bump

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mini-track/trunk/mini-track.php

    r1273 r1285  
    4848"; 
    4949 
    50 $mini_track_options['bots']="Googlebot\-Image|Googlebot|mediapartners|MSNBOT|YahooSeeker|froogle|" 
    51 ."Yahoo\! Slurp|Slurp|YahooSeeker|Yahoo Test|Yahoo (stealth)|Ask Jeeves|AskJeeves|teoma_agent|Teoma|teomaagent|slurp\@inktomi|inktomi|" 
     50$mini_track_options['bots']="Googlebot\-Image|Googlebot|mediapartners|MSNBOT|MSN stealth|froogle|" 
     51."Yahoo\! Slurp|Slurp|YahooSeeker|Yahoo Test|Yahoo stealth|Ask Jeeves|AskJeeves|teoma_agent|Teoma|teomaagent|slurp\@inktomi|inktomi|" 
    5252."Gigabot|Netcraft|ia_archiver|lycos|fast\-webcrawler|turnitinbot|technorati|Findexa|NextLinks|findlinks|" 
    5353."ZyBorg|InfoSeek|looksmart|Scooter|MARTINI|SurveyBot|Overture|VerticalCrawler|FastSearch|modspider|" 
    5454."Gais|gaisbo|zyborg|surveybot|Bloglines|BlogSearch|blogpulse|thumbshots|Snapbot|" 
    5555."Feedfetcher|BlogSearch|PubSub|pubsub|Syndic8|userland|become\.com|Yeti|naver|Sogou|Netcache|Netapp|BlogTick|Baiduspider|" 
     56."Toluu|SimplePie|" 
    5657."Virtual Reach|Wordpress\/2\.|Yandex|linkcheck|idbot|id\-search|Nutch|larbin|heritrix|WebAlta|Indy Library|"    
    57 ."Java\/|Wget\/|libcurl|libwww|lwp-trivial|urllib|GT::WWW|Snoopy|HTTP::Lite|PHPCrawl|URI::Fetch|Zend_Http_Client|http client|PECL::HTTP|"     // scrapers 
    58 ."crawler|indexer|archiver|worm|spider|bot";  // generic 
     58."Java\/|Wget\/|libcurl|libwww|Python-urllib|urllib|lwp-trivial|GT::WWW|Snoopy|HTTP::Lite|PHPCrawl|URI::Fetch|Zend_Http_Client|http client|PECL::HTTP|"       // scrapers 
     59."parser|crawler|indexer|archiver|worm|spider|bot";   // generic 
    5960 
    6061/* STOP EDITING HERE */ 
     
    168169} 
    169170 
    170 function mini_track_display() { 
    171 if (!bb_current_user_can('administrate')) {return;} 
    172 global $mini_track, $mini_track_current, $mini_track_options; 
    173 $bb_uri=bb_get_option('uri'); $profile=$bb_uri."profile.php?id="; 
    174 if (isset($_GET['mini_track_reset'])) {mini_track_activation(); mini_track_init();} 
    175 echo '<html><head><title>'.count($mini_track).' Users Online &laquo; '.bb_get_option('name').'</title> 
    176 <meta http-equiv="refresh" content="'.$mini_track_options['display_refresh_time'].';url='.$bb_uri.'?mini_track_display" /> 
    177 <style>table {border:1px solid #111; font-size:14px; font-family: arial, san-serif; line-height:150%;} table td {text-align:center; white-space:nowrap;} table .link {text-align:left;} table th.link {padding-left:5em;} 
    178 table th {background: #aaa;} .alt {background: #eee;} .tiny {font-size:12px;} .bot {color:red; font-size:90%;} .guest {color:green;}  
    179 .link div {padding-left: 5px; width:500px; white-space:nowrap; overflow; hidden;} </style> 
    180 <script>window.onload=titlelink; function titlelink() {blank="_blank"; for (i=0;x=document.links[i];++i){x.target=blank; x.title=x.href;}};</script> 
    181 </head><body>'; 
    182 echo "<div style='float:right;'>[<a href='$bb_url?mini_track_reset'><small>reset</small></a>]</div>"; 
    183 mini_track(2);  
    184 echo "<br clear=both /><table width='99%' cellpadding=1 cellspacing=1> 
    185 <tr class=alt><th>#</th><th>user</th><th>ip</th><th>referer</th><th>pages</th><th>time online</th><th>last activity</th><th class=link>last URL</th></tr>"; 
    186 $mini_track=array_reverse($mini_track,true); 
    187 $counter=0; 
    188 foreach ($mini_track as $key=>$value) { 
    189 $url=urldecode($value->url); 
    190 echo "<tr".(($counter % 2) ? " class=alt" : "")."><td align=right class=tiny ".(($mini_track_options['debug']) ?" title='$value->debug' " : "")."> ".(++$counter)." </td><td>"; // line number 
    191 if ($value->id) echo "<a  href='$profile$value->id'>$value->name</a>";                  // member profile link 
    192 elseif (isset($value->bot)) {echo "<span class=bot>".preg_replace("/[^A-Za-z_ ]+?/is","",$mini_track_options['bots'][$value->bot-1])."</span>";} else {echo "<span class=guest>guest</span>";} 
    193 echo "</td><td class=tiny><a href='?mini_track_ip=$value->ip'>$value->ip</a></td>"; 
    194 if (isset($value->referer)) {$parse_url=parse_url($value->referer);     // referer 
    195                 $host=substr(ereg_replace("^(www[0-9]?|search|talk|community|support|foro|mitmachen|board[s]?|forum[s]?)(\.?)","",$parse_url['host']),0,30);  
    196                 echo "<td><a href='$value->referer'>".$host."</a></td>";} else {echo "<td>&nbsp;</td>"; 
    197 }  
    198 echo "<td>".intval($value->pages)."</td>";                                              // page count 
    199 echo "<td class=tiny>".ceil((($value->time)-$value->seen+1)/60)." minutes</td>";        // total activity time 
    200 echo "<td class=tiny>".ceil(((time())-$value->time+1)/60)." minutes ago</td>";          // last activity time 
    201 echo "<td class=link><div style='overflow:hidden;'><a href='$url'>$url</a></div></td></tr>"; // last url 
    202 } 
    203 echo "</table></body></html>"; 
    204 exit(); 
    205 } 
    206  
    207171function mini_track_index($id=0) { 
    208172global $mini_track_options; 
     
    231195$agent=strtolower($_SERVER['HTTP_USER_AGENT']); 
    232196foreach ($mini_track_options['bots'] as $key=>$name) {if (!(strpos($agent,$name)===false)) {$bot=$key+1; break;}} 
    233 if ($bot==0)  {if (ereg("^(67\.195\.|74\.6\.)",$_SERVER['REMOTE_ADDR'])) {$bot=1+array_search("yahoo stealth",$mini_track_options['bots']);}} // yahoo fakes it 
     197if ($bot==0)  { 
     198if (ereg("^(67\.195\.|74\.6\.)",$_SERVER['REMOTE_ADDR'])) {$bot=1+array_search("yahoo stealth",$mini_track_options['bots']);} // yahoo fakes it 
     199elseif (ereg("^(65.5[2-5]\.)",$_SERVER['REMOTE_ADDR'])) {$bot=1+array_search("msn stealth",$mini_track_options['bots']);} // microsoft fakes it 
     200
    234201return $bot; 
    235202} 
     
    353320return $results[0]; 
    354321} 
     322 
     323function mini_track_display() { 
     324if (!bb_current_user_can('administrate')) {return;} 
     325global $mini_track, $mini_track_current, $mini_track_options; 
     326$bb_uri=bb_get_option('uri'); $profile=$bb_uri."profile.php?id="; 
     327if (isset($_GET['mini_track_reset'])) {mini_track_activation(); mini_track_init();} 
     328echo '<html><head><title>'.count($mini_track).' Users Online &laquo; '.bb_get_option('name').'</title> 
     329<meta http-equiv="refresh" content="'.$mini_track_options['display_refresh_time'].';url='.$bb_uri.'?mini_track_display" /> 
     330<style>table {border:1px solid #111; font-size:14px; font-family: arial, san-serif; line-height:150%;} table td {text-align:center; white-space:nowrap;} table .link {text-align:left;} table th.link {padding-left:5em;} 
     331table th {background: #aaa;} .alt {background: #eee;} .tiny {font-size:12px;} .bot {color:red; font-size:90%;} .guest {color:green;}  
     332.link div {padding-left: 5px; width:500px; white-space:nowrap; overflow; hidden;} </style> 
     333<script>window.onload=titlelink; function titlelink() {blank="_blank"; for (i=0;x=document.links[i];++i){x.target=blank; if (!x.title.length) {x.title=x.href;}}};</script> 
     334</head><body>'; 
     335echo "<div style='float:right;'>[<a href='$bb_url?mini_track_reset'><small>reset</small></a>]</div>"; 
     336mini_track(2);  
     337echo "<br clear=both /><table width='99%' cellpadding=1 cellspacing=1> 
     338<tr class=alt><th>#</th><th>user</th><th>ip</th><th>referer</th><th>pages</th><th>time online</th><th>last activity</th><th class=link>last URL</th></tr>"; 
     339$mini_track=array_reverse($mini_track,true); 
     340$counter=0; 
     341foreach ($mini_track as $key=>$value) { 
     342$url=urldecode($value->url); 
     343echo "<tr".(($counter % 2) ? " class=alt" : "")."><td align=right class=tiny> ".(++$counter)." </td><td>";      // line number 
     344if ($value->id) echo "<a  href='$profile$value->id'>$value->name</a>";                  // member profile link 
     345elseif (isset($value->bot)) {echo "<span class=bot>".preg_replace("/[^A-Za-z_ ]+?/is","",$mini_track_options['bots'][$value->bot-1])."</span>";} else {echo "<span class=guest>guest</span>";} 
     346echo "</td><td class=tiny><a ".(($mini_track_options['debug']) ?" title='$value->debug' " : "")." href='?mini_track_ip=$value->ip'>$value->ip</a></td>"; 
     347if (isset($value->referer)) {$parse_url=parse_url($value->referer);     // referer 
     348                $host=substr(ereg_replace("^(www[0-9]?|search|talk|community|support|foro|mitmachen|board[s]?|forum[s]?)(\.?)","",$parse_url['host']),0,30);  
     349                echo "<td><a href='$value->referer'>".$host."</a></td>";} else {echo "<td>&nbsp;</td>"; 
     350}  
     351echo "<td>".intval($value->pages)."</td>";                                              // page count 
     352echo "<td class=tiny>".ceil((($value->time)-$value->seen+1)/60)." minutes</td>";        // total activity time 
     353echo "<td class=tiny>".ceil(((time())-$value->time+1)/60)." minutes ago</td>";          // last activity time 
     354echo "<td class=link><div style='overflow:hidden;'><a href='$url'>$url</a></div></td></tr>"; // last url 
     355} 
     356echo "</table></body></html>"; 
     357exit(); 
     358} 
    355359?>