msUserAgent=getenv("HTTP_USER_AGENT");; $this->gParseUserAgent(); } function gbIs2k() { if($this->masBrowserCap["2k.qs.16"]===true) { return true; } return false; } function gbIsPPC() { if($this->masBrowserCap["ppc"]===true) return true; return false; } function gasGetScreenResolution() { if(isset($this->masBrowserScreen["X"])) return $this->masBrowserScreen; return false; } function gParseUserAgent() { $infoStart=strpos($this->msUserAgent,chr(40)); $infoEnde=strpos($this->msUserAgent,chr(41)); if($sStart!==false) { $this->msType=trim(substr($this->msUserAgent,0,$infoStart)); if($infoEnde!==false) { $infoLength=$infoEnde-$infoStart-1; $sInfo=substr($this->msUserAgent,$infoStart+1,$infoLength); $asInfo=explode(chr(59),$sInfo); if(is_array($asInfo)) { foreach($asInfo as $sInfo) { $sInfo=trim($sInfo); $asData=explode(chr(32),$sInfo); if(sizeof($asData)>1) { $sName=array_shift($asData); $sValue=join(chr(32),$asData); $this->masBrowserCap[$sName]=$sValue; } else { if(strpos($sInfo,chr(120))===false) { $sInfo=strtolower($sInfo); $this->masBrowserCap[$sInfo]=true; } else { $asData=explode(chr(120),$sInfo); $this->masBrowserScreen["X"]=$asData[0]; $this->masBrowserScreen["Y"]=$asData[1]; } } } } } } } }