![]() |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||
|
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.
Source Code for the Page.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>GetRightToGo Authorization Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?php
$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;
?>
<?php
if ($authorized) {
//Show the OK page, with the "Next" button/text.
?>
Thank you! Your download is authorized.
<p>
<a href="button:next" target="_self">Click Here To Download Your Files.</a>
<?php
} 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>.
<p>
<form name="login" action="/gr2go-authorize.php" method="post">
<input type="text" name="code" size="35" maxlength="60" value="">
<br>
<input type="submit" name="submit" value="Submit Registration">
</form>
<?php
}
?>
</body>
</html>
Other Settings and Tips.
Download the builder tool and give it a try before you buy!
|
| Purchasing Options | |||||
|
©2008 Headlight Software, Inc. GetRight® is a registered trademark of Headlight Software, Inc. |