This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use GlobalPayments\Api\Entities\Address; | |
use GlobalPayments\Api\Entities\Customer; | |
use GlobalPayments\Api\Entities\Exceptions\GatewayException; | |
use GlobalPayments\Api\ServiceConfigs\Gateways\GpEcomConfig; | |
use GlobalPayments\Api\ServicesContainer; | |
use WP_Error; | |
use WP_REST_Controller; | |
use WP_REST_Request; | |
use WP_REST_Response; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include './wp-load.php'; | |
$username = $_REQUEST['username']; | |
$user = get_user_by('login',$username); | |
$userId = $user->data->ID; | |
$password = $_REQUEST['password']; | |
$new_password = $_REQUEST['new_password']; | |
if(empty($username)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//You'll need to create an API key on WHM (https://api.docs.cpanel.net/whm/tokens/) | |
$user = ""; | |
$key = ""; | |
$domain = "yourdomain.com"; | |
$saveTo = ""; | |
$url = "https://YOUR_SERVER_IP:2087/json-api/json-api/export_zone_files?api.version=1&zone={$domain}"; | |
$response = Http::withHeaders([ | |
'Authorization' => "whm {$user}:{$key}" |