Hi
I don't understand what you mean by "destroying" code. Deleting the PHP files doesn't work, at least not when it's cached, and people hopefully have backups anyway...
But if you just add something like this in your code:
PHP Code:
if (time() > strtotime('2008-03-01')) {
die("Trial expired!<br>Please contact secretlydead for a license.");
}
Then the program simply doesn't work after the date specified. If you distribute the code encrypted, it will be almost impossible to remove this check. Of course, they can simply set the clock on the server to some old date and it will work. To prevent that, you could perhaps get the time from a different server, but that would slow down the script, and what would happen if the server you get the time from can't be reached?
Anyway I don't like timebombs like that. I try different programs a lot, and very often I install something, and then I have to do some other things, and when I get back to it, it's expired, so I just delete it.
I think a better solution is to add some text that doesn't prevent the software from working, but this text can't be removed from the output pages. If your program shows something like "This is a trial version of secretlydeads program - it's not licenced so you are not allowed to use it except for testing and evaluation.". I think any website using your program would pay to get rid of this message...