This class can used to generate keys to control the distribution PHP applications that are enable according to a license.
It generates license strings that can bind PHP applications to specific servers or can only be executed during limited time period or to restrictions placed on a home server.
The binding to server process attempts to use the server network card MAC address. This feature was tested on servers are Mac OS X (Darwin), Linux, Windows XP, although it may also work for FreeBSD, NetBSD, Solaris.
The class also attempts to use information from $_SERVER variable to encode that server name, server IP, server user path and server url to the application folder. This server binding can be disabled if required, and it also possible to block the key being generated for the localhost address (127.0.0.1)
The time limiting of the license uses a start period (and a given start offset to allow for time discrepancies) and an expiry date if required.
If required when validating a key it is possible to dial home to check the license key on your own server. (see demo2.license.php file)
The PHP_OS and PHP_VERSION of the php that the key was generated for is also encrypted into the key.
It is also possible to encrypt additional information into the license key.
This class is still in development however it is stable.
For up-to-date version please visit http://www.phpclasses.org/browse/package/2298.html
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.