How to make trail version of cakephpapplication


#1

Hi guys, please I have an application i build with cakephp, I want to set an expiring date on the application such that if I install the application for clients it will be active for one year which is 365days and it will expire, then they renew the contract, although I know there are guys who can break it but I really need it. Please guys help

Thanks in advance.


#2

Just put the expiry date in a config file or the database, and check against that date in your beforeFilter handler or a middleware?


#3

Thanks, but I will appreciate if you can guide me please

Thanks


#4

This is a place where we help people solve specific problems, not where we write your code for you. If you have no idea at all how to do any of the things I’ve suggested, then you’re going to have much bigger problems actually writing your main business logic! If you do have ideas about how to do these things, then take a stab, and when you run into more specific issues, post some code with expected and actual results, and we’ll help you work though those issues.


#5

Thanks man, I have done it.


#6

It is going to be super easy to break that :slight_smile:


#7

You mean - Trial version.

I had done something similar and a bit more sneakier.

The bootstrap would check for a lock file, if it is present and has an x value then continue or else dont.

then config file would generate that lock file only as long as the A timestamp is reached. Having said that, it is actually another file which is created by the code in config file and upon reaching that timestamp the hash generating file self-deletes. This way, it becomes impossible to crack after the time has gone but if the code is studied, it is much easier to replicate the same.


#8

Basically, anything in PHP is going to be easy for someone knowledgeable to break; just the code that does the check. The OP seems okay with that. Any strategy is really at best going to move it from 5 minutes of effort to 30. But even a trivial check is going to stymie 99% of the population.


#9

One answer if your customer is connected to web would be to make some of the business logic dependant of an api hosted on your own server … depending of the app …
I didnt do it because i trust my customers and it’s a small business but i thinked to do something like that with a geography calculation app.
I would just put the “magics” algorithms on my server with a frontend api and everything else on the customers servers.
This way, customers keep their own data but the magics answers they are waiting from the app is under my control.
If someone has a better answer it could be interesting ! but i doubt there is generic answer for this problem…