Hi guys, I want to make my script has license that can be generated if someone purchase it. Do you know how can I do it? Thanks!
you need to insert a function that will make the users prompt if its not registered. also after integrating that try to encrypt your source codes.
Firstly, as suggested, you'll want to encrypt your code. Then you'll want some form of license ID included in it, that will link back to your site to check the validity of the license. Then for the payment section on your site, you'll want a script that runs on payment to generate a license code and add it to your database. Hope this inspires you, as it's not something i've tried before.
Here is a little sneaky thing I used to do before I bit the bullet and bought Zend (which solves all this) Firstly in the install code I get the script to email me (put the mail function someplace out of the way and rename it using an innocent include file) I have a small piece of code that goes into all of my paid for scripts that I got encrypted by a friend of mine. It contains a lot of standard routines as well as a routine that allows commands to be entered direct from a referring webpage of a certain name. ie the script calls "include_once("main.php")" but my web page calls targetsite dot com slash main.php with the commands in a post variable. I have four commands I can issue: 1. Display a payment request from the owner every time any page is entered. 2. As above but stop the site from working (ie freeze it using exit) 3. Release the site and write a file that blocks commands 4. Delete all databases that are deletable. Leave a permanent message on all pages. Next when I have an email I wait a month. If no payment arrives I issue command one with a message to contact me on my email about paying for the code. If no result I issue command 2 warning of consequences and wait a month before wiping the site out with 4. Of course if I get payment I issue command 3 and lock myself out. In pseudocode here is roughly how it works (I wrote it 5 years ago) names are representative but not same ones This is the first subroutine and its always called when the file is loaded. 1. check to see if a post variable called xb66526af exists 2. if it does check to see if a text file called mblog887 exists 3. if the file exists I am locked out and the routine finishes 4. check to see the referring webpage is called amblexkillr56 5. if it is then regard the post variable as a command and look for a message in another post variable 6. If a message set the global variable xxmmsg to its contents. 7. if blocking required set global variable xxmsgfd56flag to 999 8. do any other stuff and exit Now in all other routines - these are routines that do common chores on filenames, strings, database etc - I add call to a second routine. 1 check the xxmmsg variable to see if it contains anything. If so echo <h2>variable contents</h2> to the screen 2 check the xxmsgfd56flag to see if its 999. If it is then I sleep 10 seconds and exit the program completely. 3 back to calling routine Hope this helps - all you need is a m8 with zend or you can use an online obfuscator but its less secure.
Or you could try a pre-made licensing solution such as SPBAS (free version available for up to ten customers, beyond that it starts at $200 for a thousand).
Hi Guys, thanks for the information given @Rory, thanks for the link! I'm going to check it out. @mattinblack, cool sharing! I'll see what can I do by applying your tips.