Esempio n. 1
0
 /**
  * Returns protocol and domain name.
  * 
  * @return	string
  */
 public static function getHost()
 {
     if (empty(self::$host)) {
         // get protocol and domain name
         $protocol = 'http://';
         if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['SERVER_PORT'] == 443) {
             $protocol = 'https://';
         }
         self::$host = $protocol . $_SERVER['HTTP_HOST'];
     }
     return self::$host;
 }
Esempio n. 2
0
	/**
	 * Returns protocol and domain name.
	 * 
	 * @return	string
	 */
	public static function getHost() {
		if (empty(self::$host)) {
			self::$host = self::getProtocol() . $_SERVER['HTTP_HOST'];
		}
		
		return self::$host;
	}