public_html/wp-content/plugins/wp-statistics/includes/classes/statistics.class.php
// It is used in several places to get the SE icon or the sql query to select an individual SE from the database.
It is used in several places to get the SE icon or the sql query to select an individual SE from the database.
It is used in several places to get the SE icon or the sql query to select an individual SE from the database .
public function Search_Engine_Info( $url = false ) {
		if(!$url) {
			$url = isset($_SERVER['HTTP_REFERER']) ? $this->get_Referred() : false;
		}
		if($url == false) {
			return false;
		}
		$parts = parse_url($url);
		$search_engines = wp_statistics_searchengine_list();
		foreach( $search_engines as $key => $value ) {
			$search_regex = wp_statistics_searchengine_regex($key);
			preg_match( '/' . $search_regex . '/', $parts['host'], $matches);
			if( isset($matches[1]) )
				{
				return $value;
				}
		}
		return array('name' => 'Unknown', 'tag' => '', 'sqlpattern' => '', 'regexpattern' => '', 'querykey' => 'q', 'image' => 'unknown.png' );
	}
public function Search_Engine_Info ( $ url = false ) { if ( ! $ url ) { $ url = isset ( $ _SERVER [ 'HTTP_REFERER' ] ) ? $ this -> get_Referred ( ) : false ; } if ( $ url == false ) { return false ; } $ parts = parse_url ( $ url ) ; $ search_engines = wp_statistics_searchengine_list ( ) ; foreach ( $ search_engines as $ key => $ value ) { $ search_regex = wp_statistics_searchengine_regex ( $ key ) ; preg_match ( '/' . $ search_regex . '/' , $ parts [ 'host' ] , $ matches ) ; if ( isset ( $ matches [ 1 ] ) ) { return $ value ; } } return array ( 'name' => 'Unknown' , 'tag' => '' , 'sqlpattern' => '' , 'regexpattern' => '' , 'querykey' => 'q' , 'image' => 'unknown.png' ) ; }
It is used in several places to get the SE icon or the sql query to select an individual SE from the database.
It is used in several places to get the SE icon or the sql query to select an individual SE from the database .
// If no URL was passed in, get the current referrer for the session. // If there is no URL and no referrer, always return false. // Parse the URL in to it's component parts. // Get the list of search engines we currently support. // Loop through the SE list until we find which search engine matches. // Return the first matched SE. // If no SE matched, return some defaults.