<?php
//#####################################################################################################
/*/ 010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101 \*\
\*\ 01010101010101010101010 I N T H E N A M E O F G O D 10101010101010101010101 /*/
/*/ 01010101010101010101010 A U T H O R : M O H S E N D A V A R I 10101010101010101010101 \*\
\*\ 010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101 /*/
//#####################################################################################################
//$GLOBALS['b_n'][1]='IE';
//$GLOBALS['b_n'][2]='FIREFOX';
//$GLOBALS['b_n'][3]='Netscape';
//$GLOBALS['b_n'][4]='Safari';
//$GLOBALS['b_n'][5]='Galeon';
//$GLOBALS['b_n'][6]='Konqueror';
//$GLOBALS['b_n'][7]='Opera';
//$GLOBALS['b_n'][8]='Lynx';
//$GLOBALS['b_n'][9]='bot';
//$GLOBALS['b_n'][10]='WebTV';
//$GLOBALS['b_n'][11]='other';
////////////////////////////
//$GLOBALS['o_n'][1]='windows';
//$GLOBALS['o_n'][2]='mac';
//$GLOBALS['o_n'][3]='Linux';
//$GLOBALS['o_n'][4]='Free BSD';
//$GLOBALS['o_n'][5]='Symbian';
//$GLOBALS['o_n'][6]='SunOS';
//$GLOBALS['o_n'][7]='IRIX';
//$GLOBALS['o_n'][8]='BeOS';
//$GLOBALS['o_n'][9]='OS/2';
//$GLOBALS['o_n'][10]='AIX';
//$GLOBALS['o_n'][11]='other';
class stat_find {
var $this_browser_k='';
var $this_browser_v='';
var $this_os_k='';
var $this_os_v='';
var $v_n='notfind';
var $this_ref_base='';
var $this_ref_next='';
function find_browser($M01) {
$M01 = strtolower($M01);
if(preg_match("/msie ([0-9]{1}\.[0-9]{1,2})/",$M01,$mathes1)){
$this->this_browser_v=$mathes1[1];
$this->this_browser_k=1;
}else
if(preg_match("/firefox\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/",$M01,$mathes2)){
$this->this_browser_k=2;
$this->this_browser_v=$mathes2[1];
}else
if(preg_match("/netscape\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/",$M01,$mathes3)){
$this->this_browser_k=3;
$this->this_browser_v=$mathes3[1];
}else
if(preg_match("/safari\/([0-9]{2,3}(\.[0-9])?)/",$M01,$mathes4)){
$this->this_browser_k=4;
$this->this_browser_v=$mathes4[1];
}else
if(preg_match("/galeon\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/",$M01,$mathes5)){
$this->this_browser_k=5;
$this->this_browser_v=$mathes[1];
}else
if(preg_match("/konqueror\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/",$M01,$mathes6)){
$this->this_browser_k=6;
$this->this_browser_v=$mathes6[1];
}else
if(preg_match("/opera[\/ ]([0-9]{1}\.[0-9]{1}([0-9])?)/",$M01,$mathes7)){
$this->this_browser_k=7;
$this->this_browser_v=$mathes7[1];
}else
if(preg_match("/lynx\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/",$M01,$mathes8)){
$this->this_browser_k=8;
$this->this_browser_v=$mathes8[1];
}elseif (strpos("$M01","google") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="google";
}elseif (strpos("$M01","yahoo") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="yahoo";
}elseif (strpos("$M01","msn") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="Msn";
}elseif (strpos("$M01","slurp") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="Slurp";
}elseif (strpos("$M01","scooter") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="Scooter";
}elseif (strpos("$M01","spider") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="Spider";
}elseif (strpos("$M01","infoseek") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="infoseek";
}elseif (strpos("$M01","findlinks") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="findlinks";
}elseif (strpos("$M01","link checker") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="Link Checker";
}elseif (strpos("$M01","eEye2003") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="eeye2003";
}elseif (strpos("$M01","exabotr") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="Exabot";
}elseif (strpos("$M01","jyxobot") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="Jyxobot";
}elseif (strpos("$M01","monit") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="monit";
}elseif (strpos("$M01","aboutusbot") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="AboutUsBot";
}elseif (strpos("$M01","pingdom") !== false) {
$this->this_browser_k=9;
$this->this_browser_v="Pingdom";
}elseif (strpos("$M01","webtv") !== false) {
$this->this_browser_k=10;
}elseif (strpos("$M01","bot") !== false) {
$this->this_browser_k=9;
}elseif (strpos("$M01","nav") !== false) {
$this->this_browser_k=3;
$this->this_browser_v="Nav";
}elseif (strpos("$M01","gold") !== false) {
$this->this_browser_k=3;
$this->this_browser_v="Gold";
}elseif (strpos("$M01","x11") !== false) {
$this->this_browser_k=3;
$this->this_browser_v="X11";
}elseif (strpos("$M01","mozilla") !== false) {
$this->this_browser_k=3;
$this->this_browser_v="Mozilla";
}elseif (strpos("$M01","gecko") !== false) {
$this->this_browser_k=2;
}else{
$this->this_browser_v=$this->v_n;
$this->this_browser_k=11;
}
if ( $this->this_browser_v =='' ){
$this->this_browser_v=$this->v_n;
}
}
function find_os($M01)
{
$M01 = strtolower($M01);
if(strpos("$M01","windows nt 5.1") !== false) {
$this->this_os_k=1;
$this->this_os_v="XP";
}
elseif (strpos("$M01","windows 98") !== false) {
$this->this_os_k=1;
$this->this_os_v="98";
}
elseif (strpos("$M01","windows nt 5.0") !== false) {
$this->this_os_k=1;
$this->this_os_v="2000";
}
elseif (strpos("$M01","windows nt 5.2") !== false) {
$this->this_os_k=1;
$this->this_os_v="2003 server";
}
elseif (strpos("$M01","windows nt 6.0") !== false) {
$this->this_os_k=1;
$this->this_os_v="vista";
}
elseif (strpos("$M01","windows nt") !== false) {
$this->this_os_k=1;
$this->this_os_v="NT";
}
elseif (strpos("$M01","win 9x 4.90") !== false && strpos("$M01","win me")) {
$this->this_os_k=1;
$this->this_os_v="ME";
}
elseif (strpos("$M01","win ce") !== false) {
$this->this_os_k=1;
$this->this_os_v="CE";
}
elseif (strpos("$M01","win 9x 4.90") !== false) {
$this->this_os_k=1;
$this->this_os_v="ME";
}
elseif (strpos("$M01","mac os x") !== false) {
$this->this_os_k=2;
$this->this_os_v="OS X";
}
elseif (strpos("$M01","macintosh") !== false) {
$this->this_os_k=2;
}
elseif (strpos("$M01","PPC") !== false) {
$this->this_os_k=2;
}
elseif (strpos("$M01","linux i686") !== false) {
$this->this_os_k=3;
$this->this_os_v="i686";
}
elseif (strpos("$M01","linux") !== false) {
$this->this_os_k=3;
}
elseif (strpos("$M01","freebsd") !== false) {
$this->this_os_k=4;
}
elseif (strpos("$M01","symbian") !== false) {
$this->this_os_k=5;
}
elseif (strpos("$M01","SunOS") !== false) {
$this->this_os_k=6;
}
elseif (strpos("$M01","IRIX") !== false) {
$this->this_os_k=7;
}
elseif (strpos("$M01","BeOS") !== false) {
$this->this_os_k=8;
}
elseif (strpos("$M01","OS/2") !== false) {
$this->this_os_k=9;
}
elseif (strpos("$M01","AIX") !== false) {
$this->this_os_k=10;
}
elseif (strpos("$M01","win") !== false) {
$this->this_os_k=1;
}
else{
$this->this_os_k=11;
$this->this_os_v=$this->v_n;
}
if( $this->this_os_v==''){
$this->this_os_v=$this->v_n;
}
}
}
?>