Expiration date

Multimedia Builder (Legacy Forum)
Valero7
Posts: 10
Joined: Thu Apr 14, 2011 5:20 pm

Expiration date

Post by Valero7 »

I'm trying to implement an expiration date in a program but no matter how I approach it I do not get any results. Is this possible in MMB?
So far this is what I've tried:
** -----------------------------------------------------
PresentYear=CBK_Year

LimitYear = 2011

If (PresentYear > LimitYear) Then

Exit()
** --------------------------------------------------

Any help ? thanks

Delboy
Posts: 829
Joined: Sat Oct 23, 2010 9:28 am
Location: Reading, UK
Contact:

Re: Expiration date

Post by Delboy »

The CBK_Year object must be on the page ( you can hide it of course )

Code: Select all

LimitYear = 2012
If (CBK_Year > LimitYear) Then
  Exit()
End
here is a Day month year example.
expire_day_month_year.zip
(954 Bytes) Downloaded 249 times
Cheers
DMFX Player v3.0.9.7 Released 02/03/2016

Valero7
Posts: 10
Joined: Thu Apr 14, 2011 5:20 pm

Re: Expiration date

Post by Valero7 »

THANKS!! Delboy.
I see what I was missing in the code.

Delboy
Posts: 829
Joined: Sat Oct 23, 2010 9:28 am
Location: Reading, UK
Contact:

Re: Expiration date

Post by Delboy »

Your welcome ;)
DMFX Player v3.0.9.7 Released 02/03/2016

Caml Light
Posts: 128
Joined: Sun Nov 28, 2010 7:01 pm

Re: Expiration date

Post by Caml Light »

In my opinion the best way to protect your project with an expiration date is to use "Internet Plugin" and a server to check the date. Put into your website (Linux server) a PHP file called for example date.php with:

Code: Select all

<?php
$timestamp = date('Y/m/d',time());
echo $timestamp;
?>
Then you must add this code in MMB:

Code: Select all

URL$='http://www.yourwebsite.com/date.php'
PluginSet("Internet","URL$")
PluginRun("Internet","Codice")
PluginGet("Internet","Result$")
The Result$ variable will give you the current server date (not your exchangeable computer date). ;)

Delboy
Posts: 829
Joined: Sat Oct 23, 2010 9:28 am
Location: Reading, UK
Contact:

Re: Expiration date

Post by Delboy »

Yes I have done something similar to this before but the information was also encrypted both ways onsite and via MMB. So nothing was understandable even if found.

Cheers
DMFX Player v3.0.9.7 Released 02/03/2016

Caml Light
Posts: 128
Joined: Sun Nov 28, 2010 7:01 pm

Re: Expiration date

Post by Caml Light »

Strange... i can read correctly the current date:

2013/01/31

Try to open your browser and enter this URL:

http://www.yourwebsite.com/date.php

Let me know what you see in your browser.

Delboy
Posts: 829
Joined: Sat Oct 23, 2010 9:28 am
Location: Reading, UK
Contact:

Re: Expiration date

Post by Delboy »

Caml Light wrote:Strange... i can read correctly the current date:

2013/01/31

Try to open your browser and enter this URL:

http://www.yourwebsite.com/date.php

Let me know what you see in your browser.
No you have misunderstood me, Your code works fine ;).
I meant I did something similar except all information (Text) was Encrypted so unreadable without Decrypting on the fly in MMB.

Cheers
DMFX Player v3.0.9.7 Released 02/03/2016

Caml Light
Posts: 128
Joined: Sun Nov 28, 2010 7:01 pm

Re: Expiration date

Post by Caml Light »

ehehe, ok! ;) Did you use Systools Plugin?

Delboy
Posts: 829
Joined: Sat Oct 23, 2010 9:28 am
Location: Reading, UK
Contact:

Re: Expiration date

Post by Delboy »

Caml Light wrote:ehehe, ok! ;) Did you use Systools Plugin?
Yes ;)

Cheers
DMFX Player v3.0.9.7 Released 02/03/2016

Post Reply