HEX
Server: Apache/2.4.59 (Debian)
System: Linux emory.shared.1984.is 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64
User: u11574 (1020)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,popen,show_source,shell,symlink,proc_open,pcntl_exec,pcntl_fork,pcntl_wait,pcntl_alarm,pcntl_signal,pcntl_signal_dispatch,pcntl_getpriority,proc_get_status,expect_popen,dl,putenv,mail
Upload Files
File: /var/www/virtual/mariaellingsen.com/htdocs/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 $engine The name of the engine to retrieve.
	 *
	 * @return string The name of the engine.
	 */
	public static function engine_name( $engine ) {
		return $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;
	}
}