HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: /home/mirz4654/.trash/vibes/includes/system/class-hosting.php
<?php
/**
 * Hosting environment handling.
 *
 * @package System
 * @author  Pierre Lannoy <https://pierre.lannoy.fr/>.
 * @since   1.0.0
 */

namespace Vibes\System;

/**
 * The class responsible to manage and detect hosting environment.
 *
 * @package System
 * @author  Pierre Lannoy <https://pierre.lannoy.fr/>.
 * @since   1.0.0
 */
class Hosting {


	/**
	 * Initializes the class and set its properties.
	 *
	 * @since 1.0.0
	 */
	public function __construct() {
	}

	/**
	 * Check if Cloudflare Geoip is enabled.
	 *
	 * @return bool    True if Cloudflare Geoip is enabled.
	 * @since  1.0.0
	 */
	public static function is_cloudflare_geoip_enabled() {
		return array_key_exists( 'HTTP_CF_IPCOUNTRY', $_SERVER ) || array_key_exists( 'CF-IPCountry', $_SERVER );
	}

	/**
	 * Check if Cloudfront (AWS) Geoip is enabled.
	 *
	 * @return bool    True if Cloudfront Geoip is enabled.
	 * @since  1.0.0
	 */
	public static function is_cloudfront_geoip_enabled() {
		return array_key_exists( 'CloudFront-Viewer-Country', $_SERVER );
	}

	/**
	 * Check if Google LB Geoip is enabled.
	 *
	 * @return bool    True if Google Geoip is enabled.
	 * @since  2.3.0
	 */
	public static function is_googlelb_geoip_enabled() {
		return array_key_exists( 'X-Client-Geo-Location', $_SERVER );
	}

	/**
	 * Check if Apache Geoip is enabled.
	 *
	 * @return bool    True if Cloudfront Geoip is enabled.
	 * @since  1.0.0
	 */
	public static function is_apache_geoip_enabled() {
		return array_key_exists( 'GEOIP_COUNTRY_CODE', $_SERVER );
	}

}