public static function getOrigin() {
		$headers = getallheaders ();
		if (isset ( $headers ['Origin'] )) {
			return $headers ['Origin'];
		}
		if (isset ( $_SERVER ['HTTP_ORIGIN'] )) {
			return $_SERVER ['HTTP_ORIGIN'];
		} else if (isset ( $_SERVER ['HTTP_REFERER'] )) {
			return $_SERVER ['HTTP_REFERER'];
		} else {
			return $_SERVER ['REMOTE_ADDR'];
		}
	}