
If you
intend to sell your software on-line, you will need a way for your customers to
purchase and obtain a license key for your product. The best way to do this is
to integrate the generation of license keys with online payments.
To do this
you will need a server side script capable of generating license keys.
The website
http://hello_world.starkieenterprises.com
is an example of how to integrate license management with online software
software sales. When you purchase a master key for republican DRM you obtain
all of the HTML, PHP scripts and SQL schemas from this site. This site can be
used as a starting template for you own website. Alternatively you can
commission Starkie Enterprises to build your site for you by contacting mailto:sales@starkieenterprises.com.
This “Hello
World” website has been created with the philosphopy of separating the service
logic from the presentation. To do this nearly all of the PHP scripts hand over
control to another HTML script after they have done their processing. This enables you to use any web-site builder
software that you like to design the presentation of the website.
There is a single
PHP file “republican_drm.php” that contains the code to generate license keys
for your customers. This code is obfuscated and your software license agreement
does not permit you to modify or reverse engineer this file. In addition this
file cannot distributed to others. You are however permitted to modify all
other scripts and pages in the package.
The file
“republican_drm.php” contains a single un-obfuscated function mk_license_key,
with the following signature.
function
mk_license_key(
$trial_key, $node_locking, $host_id_str,
$license_type, $num_days,
$start_day, $start_month, $start_year,
$endday, $endmonth, $endyear,
$feature
) ;
The meaning
of these parameters are as follows.
|
Parameter |
|
|
$trial_key |
Your
masterkey. |
|
$node_locking |
Set to
either “any_host” or “node_locked” |
|
$host_id_str |
The MAC
address of the host on which the license is to run if
$node_locking==$node_locked. |
|
$license_type |
Set to
either “TRIAL”,”DURATION”, “START_END”,
or “PERMANENT” |
|
$num_days |
The
number of days that the license will last for if $license_type ==“TRIAL” is
selected. |
|
$start_day |
The day
of the month that the license will start from if $license_type ==“TRIAL” is
selected. |
|
$start_month |
The month
that the license will start from if $license_type ==“TRIAL” is selected. |
|
$start_year
|
The year
that the license will start from if $license_type ==“TRIAL” is selected. |
|
$endday |
The day
of the month that the license will end on if $license_type ==“TRIAL” is selected. |
|
$endmonth |
The month
that the license will end on if $license_type ==“TRIAL” is selected. |
|
$endyear |
The year
that the license will end on if $license_type ==“TRIAL” is selected. |
|
$feature |
An user defined
integer that can be stored in the license key and retrieved and used by your
software. |
This
function returns a string which is either
1.
A
valid license key or
2.
Begins
with the characters “ERR” and contains a text error message.
It is
recommended that you use a third party HTML authoring tool to customize this
web site, such as the Yahoo Site-Builder software.
Apart from
altering modifying the web pages to suit your company image, and adding your
own software, you will need to change the master_key in config.php to the
master_key you have purchased from Starkie Enterprises.
Firstly you
need to sign up with PayPal at http://www.paypal.com
to become a PayPal merchant. Then activate Instant Payment Notification on your
PayPal account, and the add Buy Now Buttons to your website. More detail on how
to do this is given below.
Once you
have become a merchant, activate Instance Payment notification as follows. Log
into the PayPal web site and perform the following steps.
The IPN
script provided is the simplest IPN script possible. You might want to
customize it to store more detail in your database, as well perform more checks
of the incoming data. For instance the script IPN.php does not examine the
payment amount.
Construct a Buy Now button and place it on the
page buynow.html instead of the form. Some web authoring packages allow you to
create BuyNow buttons from within them. Alternatively you can construct them on
the PayPal site as follows.
·
Click
Merchant Tools
·
Click
the Buy Now Buttons link
·
Enter
the details of the item you would like to sell. To add more details such as
your logo, postage fees, item colour, item size, click Add More Options and
enter the details
·
Click
“Add More Options”.
·
Under
“Customise Your Buyer's Experience” set the Successful payment URL to the page
“thankyou.php” on your website.
If you have
any more questions please contact mailto:support@starkieenterprises.com.