define('YOUR_LICENSE_SERVER_URL', 'https://wpdoz.com/');
$api_params = array(
'slm_action' => 'slm_check',
'secret_key' => '6083c9c624d1a4.01383132',
'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
if ( ! is_admin() ) {
wp_die( __('Bu web sitesi geçersiz bir lisans anahtarı kullanıyor. Lütfen bunu <a href="'. get_bloginfo('url') .'/wp-admin/options-general.php?page=fon_lisans">düzeltin</a>.') );
}
?>
<?php }
?>
Problem fixed
Thank you for sharing 🙂
Someone in the forum also shared the following solution.
https://wordpress.org/support/topic/how-to-create-license-key-for-specific-product/#post-13717214
I just thought of sharing this with you.
Kind regards