Setup Instructions

Step 1 - Upload the included php and txt files to your server in the same folder that your salespages and payment page will be.

Step 2 - CHMOD config.php and sells.txt to 777

Step 3 - Ensure that your salespage is a php file (you can just rename it from .html to .php). Open your page in a text editor, or your page editing program. At the top of the code, include the following lines of php code but notice the <html> tag is included in this code, so it should not be present again after this code:

<?
include_once("class.redirect.php");
include("config.php");
if (isset($_COOKIE['check'])) {
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
header("Location: http://$host$uri/$page2");
}
// Configuration
$r = new Redirect($timer);
$r->SetFilename('sells.txt');
$r->SetPage($page2);
$r->SetTimeTag('TimeTag');
$r->SetCountTag('CountTag');
$r->SetProdLeft($sales);
// Cookie
if (!isset($_COOKIE['check'])) { setcookie ("check","yes", time()+3600); }
?>
<html>
<? $r->Write(); ?>

Step 4 - To display the countdown timer in your salespage, add the code "<span id="TimeTag"></span>" (no quotes) where you want it to show. You can also show the count of products sold by adding "<span id="CountTag"></span>" (no quotes) where you want it to show.

Step 5 - Ensure that your payment page is a php file. At the top of the code, add the following lines of php code:

<?
include_once("class.redirect.php");
$r = new Redirect(600);
$r->SetFilename('sells.txt');
$r->IncCount();
?>

Step 6 - Run settings.php in your web browser. From here, you can change how long the timer will count down on the first salespage before redirecting the user. You must also set the page which the script will redirect to. (For example, if users visit index.php as your salespage, you may want to direct them to index2.php). Once you confirm your new settings, they will be updated.

Once you have completed those steps, the setup is complete!