I've written a few PHP scripts that I want to distribute, but I only want them to run for 5 days after they are installed.

To make things more interesting I'm playing with ZZEEPhp Exe which compiles all the scripts into one windows EXE. ( any other compilers any one would recommend ? )

Ideally I'm trying to find a way in PHP that will stop the scripts 5 days after they have first been run.

I had though when they are first run, write the date into a DB, encrypt it and comapre todays date to this encrypted stored date. But I can't see that working.

Has anyone got any suggestions on how I may do this ??

Many Thanks 🙂

    you could hard code a date in the distributed version of the script (update it daily with a cron) then in the script check the hard date with the current date. would only work with the exe version obviously.

    Even better - embrace the open source movement

      Zend's encoder allows you to specify various licensing restrictions, including time-limited trials.

        Write a Reply...