I need to CURRUPT

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AdamC
Forum Newbie
Posts: 1
Joined: Wed Mar 03, 2004 1:24 pm

I need to CURRUPT

Post by AdamC »

Hi,

Anyone know of a way I can currupt the contents of files in a folder? I know its a strange request but here's what I want it for. My PHP scripts require the user to have a valid licence, if a licence is not valid I want the script to screw up basically.

Any Ideas?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

All the user would have to do is set the file to read-only (or on unix, remove the write bit).

Sounds like a bad protection system to me. If you really want to be THAT controlling, simply put a if/then check for the correct code, and then encode the whole script with something like the zend encoder - preventing them from changing the file or even seeing your code.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Alternatively, you could simply chmod the directory in question so the public does not have access. That way, the files' content stays valid and you give your customers a chance to re-new their license.

Of course, this is only works if it you application is sitting on a server.
Post Reply