Cannot get feature name?

Hi there,

I'm trying this license system and this is amazing, I've few questions:

In my application I have created an information window that contains the license information, in particular:

>Status of the license>Product Key>Email of the buyer>Type of license>Date of license activation>Machine id>Date of next renew

Until here I correctly get the status of license by checking if the license is activated or not.I successfully taken the product key using GetPKey().but I don't know how to get these values:

email of the buyer, I tried to do: ta.GetFeatureValue("email");but ta cannot find any feature with this name, I should create a custom field with this name? 'cause there is already a field that contains the email of the buyer.

and I need also to get the date of license activation, the pc name associated to the license and the date of next renew.

I should create for every fields a custom fields, or some of these are already available?

Thanks.

Every field you'll want to read from your app, you'll need to create a custom license field. The only "built-in field" is email. But you cannot read that from your app.

See: https://wyday.com/limelm/help/license-features/

So, if email is one of the fields you want to read from your app , then create a custom license field called "email" that is "readable from your app", and then you can save data to that field and read it from your app.

For manage this I builded a php script on my apache server that interact with wyday api, but I have a little question: I access to this script passing from my app a secret token which is included in my app, in this case, isn't like have the api of my account inside the code? I don't see the difference. How can I manage this situation? In particular: access to my online script which interact with Lime api from my app?

Thanks for all

Just use the product key.

Product key -> Your Server

Your server makes LimeLM calls.

Your server sends the response to your app.

But, honestly, custom license fields are the best way to handle things. You don't need "live updating" of fields that only change once every X days. See:

https://wyday.com/limelm/help/license-features/#change

Ok got it, I manage this situation using the custom field, but I need a little help if is possible. The license that my customer buy through FastSpring is generated with your php script, now each license have a duration of 1 year, what I need to do is set as custom field the expiration day, for now I did:

<?php//TODO: set your API key found in http://wyday.com/limelm/settings/$api_key = 'MY KEY';


//TODO: set the version id to generate & find keys for// the version id is found in the url. For example http://wyday.com/limelm/version/100/// the version id is 100.$version_id = '4877';


//custom fields$feature_names = array('customer_email', 'license_renew');$feature_values = array($email, "????????");


$post_data = array(    'method' => 'limelm.pkey.generate',    'version_id' => $version_id,    'num_keys' => 1,    'num_acts' => $quantity,    'email' => $email,    'api_key' => $api_key,    'nojsoncallback' => 1,    'format' => 'json');


if ($feature_names !== null){    $post_data['feature_name'] = $feature_names;    $post_data['feature_value'] = $feature_values;}


// urlencode $post_data$post_string = '';foreach ($post_data as $key => $value){    if (is_array($value))    {        foreach ($value as $sub_value)        {            $post_string .= $key.'[]='.urlencode($sub_value).'&';        }    }    else        $post_string .= $key.'='.urlencode($value).'&';}


$post_string = rtrim($post_string, '& ');


$request = curl_init('https://wyday.com/limelm/api/rest/');curl_setopt($request, CURLOPT_HEADER, 0);curl_setopt($request, CURLOPT_ENCODING, "");curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);curl_setopt($request, CURLOPT_POSTFIELDS, $post_string);curl_setopt($request, CURLOPT_SSL_VERIFYPEER, TRUE);




try{    $jObj = json_decode(curl_exec($request));


    if ($jObj->stat == 'ok')    {        foreach ($jObj->pkeys->pkey as $pkey)        {            echo $pkey->key."\r\n";        }    }    else    {        // Uncomment the next line to see the error LimeLM is giving you.        //echo $jObj->message;    }}catch (Exception $e){    // Uncomment the next line to see the exception.    //echo 'Failure: '.$e->getMessage();}?>

as you can see in the license_renew field I need to set the expiration date, which is exactly one year from the day of purchase. FastSpring have a variable for this or I need to call some php function to calculate the next year?

And, last question: how can I check if the software license is expired with Ta?

Thanks for any help.

>> "FastSpring have a variable for this or I need to call some php function to calculate the next year?"

PHP. https://www.google.com/search?q=php+1+year+from+now&ie=utf-8&oe=utf-8&client=firefox-b-1-ab

https://stackoverflow.com/a/14524760/124805

>> "And, last question: how can I check if the software license is expired with Ta?"

https://wyday.com/limelm/help/license-features/#change-datetime-check-expires

Thanks, this will help me much. For summary the situation:1. My customer buy the license through FastSpring. 2. FastSpring will generate the license with one year duration with the php script, this will create a key on WyDay server with a field called expiration_date3. The user will activate the license reiceved by email.4. Each time my Application start check if the license is valid, and if the current date is less than the expiration date, if not, the Application will not start cause the license is expired.5. FastSpring after one year generate automatically a new license and send it to my customer, the user will insert the new license in my Application.6. All the steps repeat.

Now I have some question to ask:

1. Based on the step 5, is possible via FastSpring add a php script that will update the expired license with the new expiration date? This should be done directly by FastSpring each time a license is renewed. I already asked to FastSpring this, they tell me that's possible but they cannot provide me the code to do this.

2. If the user turn back the date of the computer for "hack" the license expiration, how can I prevent this? In c# Datetime.Now return the current date of the pc, so if the user change the pc date will get an infinite software licensing.

Thanks for the help so far