Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: How to set expiry date for cms?

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to set expiry date for cms?

    Hi.
    I have a java cms and I want to set trial date for that,for example when user download my cms in trial mode after 30-days cms don`t work and need license for continue working,How I can do this?
    How I can set expiry date for my cms?


    Thanks a lot from now.


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: How to set expiry date for cms?

    I guess there are a few ways of going about for this. It all comes down to storing this information somehow though since you need to make it persistent so that every time the CMS is started up the information is retained.

    One thing you could do of course is to have the application send off a message to a server somewhere telling it who they are and checking on what time they first reported in starting the trial version of the software. Then your server can just either say yes or no to if they are allowed to use the application.

    Another way of doing this could be to just store the date and time the application was first used on the file system of where the application is run. This could of course be encrypted so it's not as hard to change as if in plain text. Then every time the application is started or by some sort of timer you could validate that the application is still in the trial period otherwise lock the user out or shut the application down.


    If you need more specific information on a selected method I'd be happy to help you out, just let us know where you get stuck. There might of course be other methods to do this as well but those are the ones that came to mind as I had a quick thought about this.

    // Json

  3. #3
    Junior Member
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to set expiry date for cms?

    Hi Json,
    Thanks for helping and I`m so happy for see u here but this two way is have a problem.
    for ONE: if they use my cms in local and intranet I can`t check my cms via server and give data from cms.
    for TWO: if user find the file is stored the time and date maybe they can change that or if they can`t find that they are can change the system time and use system.
    really how I can set time for that?
    I thank about this but I can`t resolve this. What am I doing now?

    Thanks from now

  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: How to set expiry date for cms?

    First thing you need to do is make sure that you encrypt whatever you plan on storing locally. One way of solving the setting the system time etc would be to not store the date and time the app was started the first time but to actually log the uptime of the application. Once the application reaches an uptime that you feel comfortable with the trial period runs out.

    // Json

Similar Threads

  1. [SOLVED] how to get phone time and date
    By mahdi in forum Java ME (Mobile Edition)
    Replies: 2
    Last Post: August 26th, 2009, 11:15 AM
  2. Replies: 3
    Last Post: May 8th, 2009, 01:27 PM
  3. Updation of webpage to the last modified date
    By Revathy G in forum Java Programming Tutorials
    Replies: 1
    Last Post: May 6th, 2009, 04:47 AM
  4. How to Get the current date and time
    By JavaPF in forum Java Programming Tutorials
    Replies: 2
    Last Post: December 2nd, 2008, 12:55 PM