<?phpclass keyword{public function getKeyword($referer){if(strpos($referer"{$keyword = $this>getbaidukeyword($referer);}else if(strpos($referer"{$keyword = $this>getgooglekeyword($referer);}else if(strpos($referer"{$keyword = $this>getsosokeyword($referer);}else if(strpos($referer"{$keyword = $this>getsogoukeyword($referer);}return $keyword;}//由来路取得百度关键词private function getbaidukeyword($str){$s = strpos($strwd=);if($s>){$str = substr($str$s+);$e = strpos($str&);if($e>){$str = substr($str$e);}$str = rawurldecode($str);}return $str;}//获得谷歌关键词private function getgooglekeyword($str){$s = strpos($str&q=);if($s>){$str = substr($str$s+);$e = strpos($str&);if($e>){$str = substr($str$e);}$str = rawurldecode($str);}return $str;}//获得SOSO关键词private function getsosokeyword($str){$s = strpos($str?w=);if($s>){$str = substr($str$s+);$e = strpos($str&);if($e>){$str = substr($str$e);}$str = rawurldecode($str);}else{$s = strpos($str&w=);if($s>){$str = substr($str$s+);$e = strpos($str&);if($e>){$str = substr($str$e);}$str = rawurldecode($str);}}return $str;}//获得sogou关键词private function getsogoukeyword($str){$s = strpos($strquery=);if($s>){$str = substr($str$s+);$e = strpos($str&);if($e>){$str = substr($str$e);}$str = rawurldecode($str);}return $str;}}?>