Restricting script execution by domain

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
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

Restricting script execution by domain

Post by jaymoore_299 »

I want to restrict a php script to a specific domain such that only from that domain can the script run. I want this restriction to be very hard to locate in the php files so that you can't just search http://www.domain.com in some file and change it to whatever you want. The purposes of this is so that I can sell the script as commercial product. Anyone know if this is possible?
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

You could hide it in the scripts using different types of encryption, your best bet is to have your script validate itself against some kind of lisencing server you control, and make this validation deeply integrated...


there is no foolproof way, you should also check out the different products zend offers all of which can be gotten around, some of their products encrypt the code and have it expire after certain amounts of time, or limit the script to certain domains like you said.
Post Reply