Hey Mark,
>> "So if this cannot be resolved I will be looking around for other solutions."
We try to answer questions with as much specificity as the question asks. You're asking generically how to do a thing (set dates: user the web API & custom license fields, read date: use GetFeatureValue() ). If you want more specificity you need to ask us what doesn't make sense.
Unfortunately we don't have the resources to respond with a novel to every question just so we can cover every possible misunderstanding. You need to tell us what you do and don't understand.
>> "I would of thought this would be one of the simplest examples you could give out to users of LimeLM."
Right, and we do. Download the web API for multiple examples of using the web API. Read the articles to see other smaller examples. And for 1-liners (like changing a custom license field, we just mention the function you need to use and presume that's enough information).
Set values: use the web API. Which API function? Well, it depends on your needs. Do you want to set the expiration date when you generate the product key?
Web API function: http://wyday.com/limelm/help/api/limelm.pkey.generate/PHP function in LimeLM.php that calls that web API function: LimeLM::GeneratePKeys()
How do you set the custom license field? Well, it's a 1-liner (which I've exploded into multiple lines below), hence no "example" (see PaymentSetting.php, specifically the SendPKeys() function to see how the function is called, and the response is parsed).
$one_year_from_now = date('Y-m-d H:i:s', strtotime('+1 year'));
$num_keys = 1;$num_acts = 1;$email = 'your@example.com';$field_names = array('subscription_expires');$field_vals = array($one_year_from_now);$xml_response = LimeLM::GeneratePKeys('your version id', $num_keys, $num_acts, $email, $field_names, $field_vals);
And then, of course, you would need to parse the "$xml_reponse" to see if it actually succeeded and to see what the product keys are. How would you do that? See PaymentSettings.php for an exact example of how to do that.
How would you know how to generate a date 1-year from now (like shown above) without an example? It depends on the language you're using -- use Google, or Bing and you'll find thousands upon thousands of examples in your language of preference.
OK, so let's say you want to set the custom license field later. After you've already generated product keys. How do you do it? Well, again, the web API: http://wyday.com/limelm/help/api/
Which function in particular: http://wyday.com/limelm/help/api/limelm.pkey.setDetails/
How do I know that? http://wyday.com/limelm/help/license-features/#saas
I know you keep saying that article is unhelpful, but it's literally saying everything I'm saying here. You really need to tell me what is confusing you. Here's how you would use that function in PHP:
$pkey_id = '123'; // Note: NOT a product key, but the product key ID. How do you get the product key ID from the product key? Well, there's a function for that: http://wyday.com/limelm/help/api/limelm.pkey.getID/
// We're not changing the number of activations// or emails$num_acts = null;$email = null;
$one_year_from_now = date('Y-m-d H:i:s', strtotime('+1 year'));$field_names = array('subscription_expires');$field_vals = array($one_year_from_now);
$xml_response = LimeLM::SetPKeyDetails($pkey_id, $num_acts, $email, $field_names, $field_vals);
Again, you'll have to parse the response. Again, see PaymentSettings.php for an example of parsing the XML. Again, this is a 1-liner that I've exploded to multiple lines.
So how do you set the date when the customer activates? You don't. You can't. Why? Because there's no way to "cleanly" do that (I can get into this in-depth if you want: it's complicated).
So what do you do? You have some other event that set the date. Like what? Like the customer purchasing your software. What else? A customer renewing their subscription. What functions do I call? See above.
If you have questions or if any of this is not making sense then you need to tell me exactly what is confusing you. I tried to write a novel to answer all of your questions, but honestly, I have no idea what makes sense and what doesn't make sense unless you tell me.