Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Amazon\Affiliate\Admin; /** * Class Lice..
Decoded Output download
<?php
namespace Amazon\Affiliate\Admin;
/**
* Class LicenseActivation
*
* @package Amazon\Affiliate\Admin
*/
class LicenseActivation {
/**
* License activation handler
*/
public function license_activation() {
// $url = 'https://homersimpsonliveshere.com';
$url = $_SERVER['HTTP_HOST'];
$purchase_code = sanitize_text_field( $_POST['purchase_code'] );
update_option( 'ams_activated_status', 'success' );
update_option( 'ams_activated_license', $purchase_code );
update_option( 'ams_activated_site', $url );
$info = array();
$info['status'] = 'success';
$info['license_status'] = '<span class="wca-success">' . esc_html__( 'Activated', 'ams-wc-amazon' ) . '</span>';
$info['massage'] = "<p class='wca-success'> ". esc_html( $response_decode->massage ) ." </p>";
echo wp_json_encode( $info );
wp_die();
}
/**
* Deactivated license plugin
*/
public function deactivated_license_plugin() {
// Check for nonce security.
$nonce = sanitize_text_field( $_POST['nonce'] );
echo $nonce;
update_option( 'ams_activated_status', '' );
update_option( 'ams_activated_license', '' );
update_option( 'ams_activated_site', '' );
if ( ! wp_verify_nonce( $nonce, 'ams_de_activated' ) ) {
echo esc_html__( 'Busted!', 'ams-wc-amazon' );
wp_die();
}
$info['license_status'] = '<span class="wca-warning">' . esc_html__( 'Not Activated', 'ams-wc-amazon' ) . '</span>';
echo wp_json_encode( $info );
wp_die();
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace Amazon\Affiliate\Admin;
/**
* Class LicenseActivation
*
* @package Amazon\Affiliate\Admin
*/
class LicenseActivation {
/**
* License activation handler
*/
public function license_activation() {
// $url = 'https://homersimpsonliveshere.com';
$url = $_SERVER['HTTP_HOST'];
$purchase_code = sanitize_text_field( $_POST['purchase_code'] );
update_option( 'ams_activated_status', 'success' );
update_option( 'ams_activated_license', $purchase_code );
update_option( 'ams_activated_site', $url );
$info = array();
$info['status'] = 'success';
$info['license_status'] = '<span class="wca-success">' . esc_html__( 'Activated', 'ams-wc-amazon' ) . '</span>';
$info['massage'] = "<p class='wca-success'> ". esc_html( $response_decode->massage ) ." </p>";
echo wp_json_encode( $info );
wp_die();
}
/**
* Deactivated license plugin
*/
public function deactivated_license_plugin() {
// Check for nonce security.
$nonce = sanitize_text_field( $_POST['nonce'] );
echo $nonce;
update_option( 'ams_activated_status', '' );
update_option( 'ams_activated_license', '' );
update_option( 'ams_activated_site', '' );
if ( ! wp_verify_nonce( $nonce, 'ams_de_activated' ) ) {
echo esc_html__( 'Busted!', 'ams-wc-amazon' );
wp_die();
}
$info['license_status'] = '<span class="wca-warning">' . esc_html__( 'Not Activated', 'ams-wc-amazon' ) . '</span>';
echo wp_json_encode( $info );
wp_die();
}
}
Function Calls
None |
Stats
MD5 | f8900c5bb4e98c7850e050513c01507f |
Eval Count | 0 |
Decode Time | 50 ms |