• Hello
    Good time

    I am from Iran
    Sorry if i do not speak well

    I use your plugin Software License Manager

    I’ve made nearly 60 licenses with your plugin and I’ve delivered my products to customers in this form.

    The problem that plagues me in the plugin is that if my site becomes compromised for any reason, all of my clients’ sites are having difficulty (considering that my products are the WordPress site template)

    I want a solution that will then not validate after the site license approval by the site after the purchase of the product, until a message from the site server (my site) is sent to the client site (Licensing).

    I mean, now every second, and every load on the site of each client, the license confirms the request from my site server (licensor), but I want to be able to do the first validation only for the first time. It will not be validated until the next message sent from my server and site

    So that if my site (licensee site) is fixed, my clients’ sites will not fail and fail to fail.

    Thank you for guiding me ….

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    The problem that plagues me in the plugin is that if my site becomes compromised for any reason, all of my clients’ sites are having difficulty (considering that my products are the WordPress site template)

    So let me see if I understand what you mean. You are saying that if your site goes down for what ever reason, your clients will have difficulties. If this is correct, what kind of difficulties are you referring too?

    Regards

    • This reply was modified 7 years, 7 months ago by mbrsolution.
    Thread Starter saleh talebi

    (@saleh0936)

    Hello
    Thank you for the answer
    Yes, that’s right
    I want a solution after the first activation of the license
    Until I send a message from my side to the customer’s site, it will not be disabled so that it will apply for approval at any time.

    As long as the site (license server) is disconnected for any reason, other customer sites (WordPress template) will not be disconnected.

    Thank you

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, I have submitted a message to the developers to investigate further your request.

    Thank you

    This plugin doesn’t require you to do any validation after the first activation is done. You are in total control in terms of how you write your client side code to do the validation. You control how often (if at all), you want to validate the key after the first activation. Nothing needs to be done on this plugins end as it just sits there waiting to receive API calls from your client side program. Adjust your code in your client side software so you are not doing the validation anymore after the first activation.

    Thread Starter saleh talebi

    (@saleh0936)

    What exactly should I do now?
    Please see more explanation …

    Thread Starter saleh talebi

    (@saleh0936)

    How should I change?
    you have a solution for this code:

    <?php
    define('YOUR_LICENSE_SERVER_URL','https://localhost');
    $api_params=array('slm_action'=>'slm_check','secret_key'=>'245454545445','license_key'=>get_option('sample_license_key'),);
    $response=wp_remote_get(add_query_arg($api_params,YOUR_LICENSE_SERVER_URL),array('timeout'=>20,'sslverify'=>false));
    $license_data=json_decode(wp_remote_retrieve_body($response));
    global $active,$message;if($license_data->result=='success'){
    ?>
    <?php }
    else{?>
    <?php wp_die(__('No License'));?><?php }?>

    This is the same as the license receipt form and its validation or deactivation:

    function sample_license_management_page () {
        echo '<div class = "wrap">';
        echo '<h2> Manage Template Licensing </ h2>';
        if (isset ($ _ REQUEST ['activate_license'])) {
            $ license_key = $ _REQUEST ['sample_license_key'];
            $ api_params = array (
                'slm_action' => 'slm_activate'
                'secret_key' => YOUR_SPECIAL_SECRET_KEY
                'license_key' => $ license_key
                'registered_domain' => $ _SERVER ['SERVER_NAME'],
                'item_reference' => urlencode (YOUR_ITEM_REFERENCE)
            );
            $ query = esc_url_raw (add_query_arg ($ api_params, YOUR_LICENSE_SERVER_URL));
            $ response = wp_remote_get ($ query, array ('timeout' => 20, 'sslverify' => false));
            if (is_wp_error ($ response)) {
                echo "Unexpected error! Query sent with an error.";
            }
            $ license_data = json_decode (wp_remote_retrieve_body ($ response));
            if ($ license_data-> result == 'success') {
                echo '<br /> The following message was returned from the server:'. $ license_data-> message;
    echo '<br /> Licensed successfully. ';
                update_option ('sample_license_key', $ license_key);
            }
            else {
                echo '<br /> The following message was returned from the server:'. $ license_data-> message;
            }
        }
        if (isset ($ _ REQUEST ['deactivate_license'])) {
            $ license_key = $ _REQUEST ['sample_license_key'];
            $ api_params = array (
                'slm_action' => 'slm_deactivate'
                'secret_key' => YOUR_SPECIAL_SECRET_KEY
                'license_key' => $ license_key
                'registered_domain' => $ _SERVER ['SERVER_NAME'],
                'item_reference' => urlencode (YOUR_ITEM_REFERENCE)
            );
            $ query = esc_url_raw (add_query_arg ($ api_params, YOUR_LICENSE_SERVER_URL));
            $ response = wp_remote_get ($ query, array ('timeout' => 20, 'sslverify' => false));
            if (is_wp_error ($ response)) {
                echo "Unexpected error! Query sent with an error.";
            }
    
            $ license_data = json_decode (wp_remote_retrieve_body ($ response));
    
            
            if ($ license_data-> result == 'success') {// Success was returned for the license activation
                echo '<br /> The following message was returned from the server:'. $ license_data-> message;
                echo '<br /> Licensed successfully. ';
                update_option ('sample_license_key', '');
            }
            else {
                echo '<br /> The following message was returned from the server:'. $ license_data-> message;
            }
            
        }
        ?>
        <p> Please enter the license key to activate the template, when you purchase the product, the license key has been delivered to you, if you do not have a license key, contact us.
    
    </ p>
        <formaction = "" method = "post">
            <table class = "form-table">
                <tr>
                    <th style = "width: 100px;"> <label for = "sample_license_key"> license key </ label> </ th>
                    <td> <input class = "regular-text" type = "text" id = "sample_license_key" name = "sample_license_key" value = "<? php echo get_option ('sample_license_key');?>"> </ td>
                </ tr>
            </ table>
            <p class = "submit">
                <input type = "submit" name = "activate_license" value = "activation" class = "button-primary" />
                <input type = "submit" name = "deactivate_license" value = "disable" class = "button" />
            </ p>
        </ form>
        <? php
        
        echo '</ div>';
    }
    ?>

    Please guide me

    I will need to look at your particular setup and understand project and code to be able to provide a reply. This is not something I can look at for free unfortunately as it will take a lot of time. You can use the contact form on our site to get it touch (if you want to receive some consultation for this).

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘License validation problem at any time’ is closed to new replies.