403Webshell
Server IP : 46.17.175.229  /  Your IP : 216.73.217.176
Web Server : LiteSpeed
System : Linux lt-bnk-web1163.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User : u528038015 ( 528038015)
PHP Version : 8.2.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/php-xray/php/profiler/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/php-xray/php/profiler/classes/xray-profiler-css-resource-parser.php
<?php

/**
 * Copyright (с) Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2022 All Rights Reserved
 *
 * Licensed under CLOUD LINUX LICENSE AGREEMENT
 * https://www.cloudlinux.com/legal/
 */

namespace XrayProfiler;

if (!class_exists('\XrayProfiler\CssResourceParser')) {
    class CssResourceParser
    {
        /**
         * @var int
         */
        private $count = 0;

        /**
         * @param string $html
         *
         * @return void
         */
        public function parse($html)
        {
            $html = $this->removeNoscriptTags($html);
            if (0 === strlen($html)) {
                return;
            }

            if (!preg_match_all('/<link[^>]+href=[\'"](?<href>.+?)[\'"][^>]*>/i', $html, $matches)) {
                return;
            }

            if (!is_array($matches) || empty($matches[0])) {
                return;
            }

            foreach ($matches[0] as $key => $link_fragment) {
                if (preg_match('/rel=["\']preload["\']/i', $link_fragment)) {
                    // skip preloaded links
                    continue;
                }

                if (preg_match('/\bdisabled\b/i', $link_fragment)) {
                    // skip disabled links
                    continue;
                }

                $link_url = $matches['href'][$key];
                $url_path = parse_url($link_url, PHP_URL_PATH);
                if (!is_string($url_path)) {
                    continue;
                }

                $extension = pathinfo($url_path, PATHINFO_EXTENSION);
                if ('css' !== $extension) {
                    continue;
                }

                $this->count++;
            }
        }

        /**
         * @return int
         */
        public function getCount()
        {
            return $this->count;
        }

        /**
         * Removes NOSCRIPT HTML tags from HTML markup.
         *
         * @param string $html HTML code.
         *
         * @return string HTML code without NOSCRIPT tags.
         */
        public function removeNoscriptTags($html)
        {
            return (string) preg_replace('#<noscript(.*?)>(.*?)</noscript>#is', '', $html);
        }
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit