ebookHTML Executable 3.5 - ebook compilerwebsite compiler

» Protect your eBooks from unauthorized distribution

If you sell eBooks, you have to send the full version to your customers. However, if the full version of your eBook is not protected, it can be easily shared.

HTML Executable gives you means to prevent unauthorized distribution of protected files: activation or hardware-locked registration keys, i.e. keys that will only work on a single computer.

With HTML Executable, you can create restricted versions of ebooks and digital publications to let your future customers try out them before purchase, or control who may access your full unlocked ebook after purchase. No external expensive DRM (Digital Rights Management) solution is required.

bulletTo unlock a restricted version of your ebook, your customer does not need to download anything. You send him a registration key that he enters in the ebook program. This key unlocks the full version instantly.

bulletRegistration keys can be hardware-locked: they will work on a single computer only. Thus, it is useless for the user to share his key since it will not work on other computers.

bulletDelivery of license keys is automatic thanks to our key generator scripts.

» Accept PayPal purchases for your ebooks and deliver registration keys instantly

For HTML Executable users, we offer a PayPal kit that automates the delivery of registration keys for their ebooks by email, immediately after a successful order with PayPal.

PayPal is an e-commerce business allowing payments and money transfers to be made through the Internet. PayPal serves as an electronic alternative to traditional paper methods such as checks and money orders.

download infoDownload the HTML Executable PayPal kit (hepaypalkit.zip, 24 kb).

Requirements: apache, php version 4 or above, server with mail function enabled (or a SMTP server), PayPal Business account.

License: GNU GPL, except the hekeygen.php file which is not included in the kit. Based on PHP PayPal IPN DigiSell by Vikas Patial (ngcoders.com).

» Basic installation instructions for advanced users

A more detailed tutorial with screenshots is available

  1. Unpack the hepaypalkit.zip archive to a folder on your computer.
  2. Edit the "inc/settings.php" file. See the comments in the file for further details.
  3. The HTML Executable PHP Key Generator is required. This file is named hekeygen.php and is only available for registered users of the Professional/Commercial edition of HTML Executable. You can download it from the User Control Panel of our website: see your registration notice for further instructions.
  4. Upload the folder to your server, in the location you specified in the settings.php file with the $script_location variable.
  5. Open your web browser, and navigate to the location of the check.php file. This script makes some tests of your installation and settings.
  6. If all tests were successful, the program is ready. You need to create a PayPal button now.

You are free to modify and enhance the scripts. The kit uses the PayPal's IPN feature.

» Configure your HTML Executable ebook

We will show you how to configure HTML Executable so that your ebook or publication accepts registration keys, then we will install the Paypal php kit on a server. Only basic steps will be covered: more tutorials about making trial ebooks are available.

For this tutorial, the sample named "Peter Pan Ebook" and provided with HTML Executable is used. You can find it in the "Samples" folder.

When your project is opened, go to the Security tab as shown on the picture below and edit the Registered certificate:

The "Certificate Settings" window is opened:

Open Notepad and copy/paste the Unique Certificate Signature (or write it down somewhere). It will be needed for configuring the Paypal kit. Choose "Activation Properties" and make sure "Registration Key" is selected:

If you want to use hardware-locked keys, turn on the option. For this tutorial, we will keep this option. Remember that an hardware-locked key will only work on a given computer.

Saves changes by clicking OK and double-click on Default this time to edit it.

We need to give the end user the possibility to purchase our ebook online. We will create a webpage with a Paypal "Buy Now" button on it. Enter the URL in the "Online Order Page URL" field.

This webpage is available for instance at http://samples.htmlexe.com/paypalebook/purchase.htm.

Saves changes by clicking OK and build your publication. It is ready for distribution.

When your unregistered customers run your ebook, the following nag screen appears:

Two things to note:

  • clicking "Purchase Online" leads them to the webpage where they can purchase your ebook with the Paypal button: their web browser is opened to navigate to the URL you entered above.
  • A System ID appears: DA8A-H585. This ID is based on hardware serial numbers: it is required to generate a unique registration key. Consequently, a customer must provide you with this system ID when he purchases your ebook. Fortunately, Paypal allows you to add input fields to their Buy Now buttons. Just keep in mind that we have to ask the customer for a System ID.

» Configure the HTML Executable Paypal kit

You should have downloaded and unpacked the hepaypalkit.zip file

Edit the "inc/settings.php" file and make the necessary modifications. Especially $script_page should point to the webpage with the "But Now" button.


// URL of directory where script is stored (include trailing slash)

$script_location = 'http://samples.htmlexe.com/paypalebook/'; 

// URL of page from where the paypal script is called 

$script_page     = 'http://samples.htmlexe.com/paypalebook/purchase.htm'; 

// URL of the Thank you page (once payment is made, payee is sent to this page by Paypal)

$script_thankyou = 'http://samples.htmlexe.com/paypalebook/thanks.htm'; 

// Various Emails						

The most important step is to configure the settings related to your ebook:

/* Ebook Details

Number = a number associated to your ebook for internal purposes and security check.
		The item ID (item_number) field of Paypal IPN must match this number.
Price = purchase price. Currency set up below.
Certificate ID = the "Unique Certificate Signature" of the registered certificate you want to make a key for.
					See http://help.htmlexe.com/trialtools.htm
HardwareLocked = 0 or 1. 	If 1, the user is asked for his system ID and an hardware-locked key is generated after paypal's payment.
							If the publication does not use hardware-locked keys, it should be 0.

product[number] = array('Ebook Title' ,'Price' , 'Certificate ID', '0'); 

*/

$products[1] = array('Peter Pan Ebook','9.95', '8EKzn601IkXH7ip4z', '1');

We added the title of your ebook, its price ($9,95 for instance), the Unique Certificate Signature we copied previously in Notepad (or that you wrote down somewhere) and the final '1' means that we use hardware-locked keys.

Save the modifications to the settings.php file.

Do not forget that you need the hekeygen.php file too. Go to the User Control Panel (the URL is in your registration notice you received when you bought your license for HTML Executable), choose "Download key generators":

Click the "PHP key generator script" link and the Zip archive contains the hekeygen.php file.

Place hekeygen.php in the "inc" subfolder (in the same place as settings.php).

After that, upload all files to your server and when it is done, open your web browser, navigate to the location of the check.php file.

All tests should be successful. Click Send email to verify that your server can send emails to customers.

You should keep this webpage open as it contains some settings useful for creating the Buy Now button.

IMPORTANT: we recommend you to restrict the access to check.php (password protect it for instance) or simply remove it after use.

bulletYou are ready to create a "Buy Now" button with Paypal.

» Create a "Buy Now" button and configure it

Now that the PayPal script is installed and configured, we can create the Purchase webpage and add a "Buy Now" button to it.

Go to PayPal and log in. Choose Merchant Services and Buy Now Button.

Fill in the form as shown previously on the check.php page:

The Item ID must match the number that appears between the [] brackets in the $products[1] array variable (in settings.php).

If you use hardware-locked keys, add a text field, call it "Your System ID:" and click Done.

Step 3: turn Add advanced variables on and add a variable notify_url that points to the location of the paypal.php file on your server:

Click "Create Button" and you have the code to copy/paste in your purchase webpage.

For instance, we made a sample purchase webpage to give you an idea:

Finally, we can test our entire work.

 will show you how to configure HTML Executable so that your ebook or publication accepts registration keys, then we will install the Paypal php kit on a server. Only basic steps will be covered: more tutorials about making trial ebooks are available.

» Testing a "Buy Now" button

PayPal provides their users with a sandbox mode. We recommend you to test your scripts in it.

Let's go purchasing our ebook: we started our ebook, clicked "Purchase Online" and our web browser was opened to the purchase web page.

We enter our system ID as requested:

When clicking Buy Now, we are redirected to the Paypal's secure server:

After review, clicking "Pay Now" finalizes the order:

We have received our registration key by email immediately:

and we can enter it in the ebook program:

Our copy of the ebook was successfully registered and now fully unlocked as seen in the About box:

Of course, a registration key will only work on a given computer. If you try this key on another one, it will not be recognized.

This is the end of this tutorial.

bulletTry the Free Trial of HTML Executable

bulletPurchase a license now

 

Copyright © G.D.G. Software 2009. All rights reserved.
 www.gdgsoft.com | Top | Contact | Affiliates | Search this site |Valid XHTML 1.0 Strict