Search GetRight Support:
GetRight Pro
   Go!      Go!    Home   Download   Buy   Information 
  ·   Samples & Screenshots   ·  Contact Us

How To do a Registration Code Checker
Why wait until after someone has downloaded GBs from your server to find out if they're using a valid registration code? If they don't have one, don't waste your bandwidth!

On the "Startup Message" in the "Pro 2" tab in the builder, you can set a URL for a web page that will be displayed before the download starts. When the page is shown in the GetRightToGo built downloader, they must click a specially coded "Next" button before the actual download will start.

That startup page could show a simple form to enter their code, then only shows the special "Next" button after the code has been validated. It would be easy by just submitting the form to a script on your server that checks the code. The script either would output the form again with an error message if the code wasn't right, or a "thanks" page with the "Next" button. The script could even save the codes in a database with a counter, so could block any codes that had been shared. All before the download even starts--which if the file is a big GB sized file, would save a lot of bandwidth.

A simple PHP script example.
This script is on one of our servers, so you can see how it works in action. Your checks would need to be included (and more complex). To try it, put this in as the Startup Web Page in the builder to see how a code checker could work!

Source Code for the Page.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<title>GetRightToGo Authorization Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 

$TheCode = $_POST["code"];
$authorized = false;

//Check the code.
//TODO: this should be far more sophisticated :)
//It could also save the codes to a database, to limit the number of times
//a single code could be used.
if ($TheCode=="12345") $authorized = true;

if ($authorized) { 
       //Show the OK page, with the "Next" button/text.

Thank you!  Your download is authorized.
<a href="button:next" target="_self">Click Here To Download Your Files.</a>

} else { 
       //Show the form to login
       if ($TheCode!="") {
               echo "<i>The code you entered is not valid.</i><p>";

Please enter your registration code.  For this example, it is <b>12345</b>.
<form name="login" action="/gr2go-authorize.php" method="post">
<input type="text" name="code" size="35" maxlength="60" value="">
<input type="submit" name="submit" value="Submit Registration">




Other Settings and Tips.

  1. Because you are protecting the download, make sure to use the "Encrypt URLs" on the "Pro1" tab.

  2. You can store the codes entered in a database to limit the number of downloads a code is allowed.

    When doing this, you can also pass a unique ID to your script that GetRightToGo generates for the PC: This unique ID can be used to allow downloads later from the same PC--so instead of a registration code working 2 or 3 times, it could work from 2 or 3 different PCs, but only those PCs.

Download the builder tool and give it a try before you buy!

Purchasing Options
©2018 Headlight Software, Inc.
GetRight® is a registered trademark of Headlight Software, Inc.