944,149 Members | Top Members by Rank

Ad:
  • PHP Code Snippet
  • Views: 4620
  • PHP RSS
0

GETTING PAID by time locking templates

by on May 11th, 2007
I absolutely hate it when I trust a person and never collect a deposit on work only to NOT be paid when I'm done.

I recently designed a flash page turn effect that is all XML controlled for a Realtor where the agents could simply upload the images to a folder, use the online editor to edit the XML file and have the images show up as pages that turn like a real page (flash action naturally) All said and done, "oh, I dont have enough to pay you."

Well there are times I get this gut feeling to protect my code so here is a short sweet and simple method for doing so.

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 between the doctype all the way down to the </head> AFTER you include the little snippet below.

If you don't know how to encrypt or where you may certainly use my encrypting tool I purchased a few years back. Zend and IonCube are popular as well. http://www.jaredritchey.com/codelock/ Just select SEGMENT and paste in your code. Other methods wont work because my directories are all 600 and wont allow access.
PHP Code Snippet (Toggle Plain Text)
  1. ##### Here is how you get your time, create time.php
  2. <?php
  3. echo time();
  4. ?>
  5.  
  6. #### Here is the timelock code commented so its easy to follow
  7. <?php
  8. //PHP Code for timelock:
  9. // add the following code to your project.
  10. // the time reflects the linux / unix time using the simple echo time();
  11. // the $start_trial time is the current time or the time I create the trial period to begin.
  12. $start_trial = 1157044256;
  13. // to add the trial time you multiply days times hours times minutes times seconds so
  14. // it would be 7x24x60x60=604800 for a 7 day trial.
  15. // add echo time(); to a file called time.php to get server time.
  16. //$end_trial = $start_trial + 604800;
  17. $end_trial = $start_trial + 259200;
  18. $current_time = time();
  19. $remaining_trial = $end_trial - $current_time;
  20. if ($current_time > $end_trial) {
  21. die('Your demo has expired. Jared would like to get off the government cheese program, <a href="http://www.thebrokersedge.com" target="_blank">Pay The Man!</a> You will then receive the unlock files');
  22. }
  23. ?>
Comments on this Code Snippet
May 22nd, 2007
0

Re: GETTING PAID by time locking templates

cool i have had this happen many times aswell.
Newbie Poster
Appzmaster is offline Offline
2 posts
since May 2007
Aug 12th, 2007
0

Re: GETTING PAID by time locking templates

I don't understand. What's to stop them from having one of their relatives to find this page and delete it?
Junior Poster
Dsiembab is offline Offline
156 posts
since Mar 2007
Jun 27th, 2008
0

Re: GETTING PAID by time locking templates

Had to revisit this snippet because some one told me my post had no code and that it was modified. Glad to see its still here.

~ Jared
Junior Poster in Training
php4ever is offline Offline
68 posts
since Feb 2005
Jul 1st, 2008
0

Re: GETTING PAID by time locking templates

I really want to try this code out and see if it works for me. But can you enlighten me which spot exactly to insert this code? Please, use the sample below to give insight:
PHP Syntax (Toggle Plain Text)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9. </body>
  10. </html>
Junior Poster
mexabet is offline Offline
148 posts
since Mar 2008
Jul 2nd, 2008
0

Re: GETTING PAID by time locking templates

Yes mexabet; what I do is only encrypt a portion of the html document making it difficult to fill in the blanks after expiration.

For instance, what I'll do is take a Joomla or even a WordPress theme and encrypt just the index.php file and header.php file and encrypt with the time lock.

Naturally anyone could reproduce a design simply by viewing it in most cases but most wont go through the trouble.

~ Jared
Junior Poster in Training
php4ever is offline Offline
68 posts
since Feb 2005
Nov 24th, 2008
0

Re: GETTING PAID by time locking templates

Lots of people have asked how this works by sending me emails and PM's and responding to my many blog and forums around and apparently I wasn't clear so I've added a new video on how its done.

http://www.jaredritchey.com/how-to-e...emplate-demos/

Jared
Junior Poster in Training
php4ever is offline Offline
68 posts
since Feb 2005
Oct 21st, 2010
0

Re: GETTING PAID by time locking templates

Hi:
I've been using CodeLock and find it to be perfect!
I like that it encrypts the whole file when you follow these 2 basic steps:
1. Only use <? opening tags as Codelock does not work with <?php opening tags.
2. Do not display encrypted HTML output and ALL your HTMl will work perfectly as well robots will still see your METADATA.

Best Regards,
dennishall
Junior Poster in Training
dennishall is offline Offline
70 posts
since Nov 2009
Message:
Previous Thread in PHP Forum Timeline: Help Recommending PHP, RoR or Python
Next Thread in PHP Forum Timeline: validate PHP value against predefined mysql database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC