How to get paid by time locking your templates
I like to get paid when hired to do a job, maybe I'm strange because of it. But when I trust someone to pay me after a project is done, it irritates me when I get burned. I rarely request a deposit unless I'm after special files, photos or other things which will incur an expense up front.
I recently designed an XHTML / CSS osCMax template and a custom random flash rotator all fully XML controlled for a guy. It was so clean that employees could login in, add new banners to their featured products inventory, add the link and hit submit and the slide show would cycle featured products with links. I mean how easy can it get for this person. Well I never got paid because they said they couldn't afford my work but promised they wouldn't use my code. Yeah, BS!
So before you get burned by being a competent trusting coder or designer, do this; encrypt and time lock your code.
Anytime you want to deliver a design for a client to load up and test on his machine (common request even by scammers) you simply encrypt the code below the doctype all the way down into the <body> somewhere say about half way just for good measure. But do so ONLY AFTER you include the little snippet below.
How do I encrypt?
Zend and IonCube are great investments. I own a license of IonCube and its great but if you don't want to spend the $$ then use a product I purchased a few years ago that works dandy. You can visit http://www.jaredritchey.com/codelock/ and select SEGMENT on the right to paste in your PHP or HTML code type to encrypt. (REMEMBER to keep a backup of your unencrypted code. I'm not even going to tell you how foolish I was by forgetting that a year ago) So using my codelock tool on my site is fine just don't attempt to use other methods because all of the directories have been CHMOD 644 and will likely not encrypt your code.
So where is this time lock code?
To begin with create a file called time.php or getservertime.php and add the following PHP code to get the server time.
<?php
echo time();
?>
Next after you upload that to a server and access it in your browser you will get a long server time date back which we will use now as the "START DATE" for the time lock.
The code below is fully commented so you can examine it and all you do is create a expiration date like this.
If you want to give them 7 days to try your product then its;
7 days x 24 hours x 60 minutes x 60 seconds = 604800 for a 7 day trial
That number "604800" is going to be placed in the end trial variable. Lets look at the code below;
<?php
//PHP Code for timelock:
// add the following code to your project.
// the time reflects the linux / unix time using the simple echo time();
// the $start_trial time is the current time or the time I create the trial period to begin.
$start_trial = 1157044256;
// to add the trial time you multiply days times hours times minutes times seconds so
// it would be 7x24x60x60=604800 for a 7 day trial.
// add echo time(); to a file called time.php to get server time.
//$end_trial = $start_trial + 604800;
$end_trial = $start_trial + 604800;
$current_time = time();
$remaining_trial = $end_trial - $current_time;
if ($current_time > $end_trial) {
die('Your demo has expired. Jared would like to get off the government cheese program, <a href="http://www.jaredritchey.com" target="_blank">Pay The Man!</a> You will then receive the unlock files');
}
?>
Once you get your server time (AKA: start time) and enter your trial time you simply paste that code above in the header of your PHP or HTML (parsed by php) file. It can be in as many php files in your package as you like you highlight the code, copy it, paste it into the encryptor (after you save an original) you encrypt it, paste it back into your document, save it, deliver it and GET PAID. Because if you don't they get a message that instructs them to where ever you want.
Now I did make a version that sends you an email of the install location the first time its installed but some people get psychotic about that one. I did that when I would sell a template only to have it passed around like Paris Hilton. So I changed my method to encrypt a portion of the code by using PHP Includes and a domain lock in my templates. This saves headaches from being ripped off and it doesn't put a dent in the XHTML or CSS validation of the layout. The above method however does.
Is this a surefire way to solve this issue. No! any clever person can just recreate the header area of your template and any portion they feel should be required duping your efforts. However its difficult to do so and if you use dependent external includes, each encrypted as well, the task is daunting and it would be better if they just used PayPal to enjoy their new design.
~ Jared




LinkBack URL
About LinkBacks








Bookmarks