HEX
Server: LiteSpeed
System: Linux cde2.duelhost.dk 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: dtptviut (1121)
PHP: 8.0.30
Disabled: exec,system,passthru,shell_exec,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/dtptviut/domains/teleweb.dk/public_html/wp-content/plugins/w3-total-cache/Cdnfsd_Util.php
<?php
/**
 * File: Cdnfsd_Util.php
 *
 * @package W3TC
 */

namespace W3TC;

/**
 * Class Cdnfsd_Util
 */
class Cdnfsd_Util {
	/**
	 * Engine name retrieval.
	 *
	 * @param string $w3tc_engine The name of the engine to retrieve.
	 *
	 * @return string The name of the engine.
	 */
	public static function engine_name( $w3tc_engine ) {
		return $w3tc_engine;
	}

	/**
	 * Get suggested home IP address.
	 *
	 * @return string The resolved IP address or an empty string if it resolves to a local IP.
	 */
	public static function get_suggested_home_ip() {
		$ip = gethostbyname( Util_Environment::home_url_host() );

		// check if it resolves to local IP, means host cant know its real IP.
		if (
			'127.' === substr( $ip, 0, 4 ) ||
			'10.' === substr( $ip, 0, 3 ) ||
			'192.168.' === substr( $ip, 0, 8 )
		) {
			return '';
		}

		return $ip;
	}
}