protected static function getSiteIdFromUrl($url, array $hosts)
	{
		$host = (preg_match('(^https?://([^/]+))', strtolower($url), $m)) ? $m[1] : '';
		while ($host > '')
		{
			if (isset($hosts[$host]))
			{
				return $hosts[$host];
			}
			$host = preg_replace('(^[^.]*.)', '', $host);
		}

		return '';
	}