PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/v1world.us/wp-content/plugins/dreamhost-automated-migration/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/v1world.us/wp-content/plugins/dreamhost-automated-migration/wp_api.php

<?php

if (!defined('ABSPATH')) exit;
if (!class_exists('DHWPAPI')) :
	class DHWPAPI {
		public $settings;

		public function __construct($settings) {
			$this->settings = $settings;
		}

		public function pingbv($method, $body, $public = false) {
			if ($public) {
				$this->do_request($method, $body, $public);
			} else {
				$api_public_key = $this->settings->getOption('bvApiPublic');
				if (!empty($api_public_key) && (strlen($api_public_key) >= 32)) {
					$this->do_request($method, $body, $api_public_key);
				}
			}
		}

		public function do_request($method, $body, $pubkey) {
			$account = DHAccount::find($this->settings, $pubkey);
			if (isset($account)) {
				$url = $account->authenticatedUrl($method);
				$this->http_request($url, $body);
			}
		}

		public function http_request($url, $body, $headers = array()) {
			$_body = array(
				'method' => 'POST',
				'timeout' => 15,
				'body' => $body
			);
			if (!empty($headers)) {
				$_body['headers'] = $headers;
			}
			return wp_remote_post($url, $_body);
		}
	}
endif;