WHMCS Affiliate Landing Page Customization

WHMCS Affiliate Landing Page Customization

by Dixie on October 19, 2009

To customize landing pages for WHMCS, you change the PHP code in the unencrypted aff.php page, located in the root of your WHMCS installation.

Code lifted from this thread:
http://forum.whmcs.com/showpost.php?p=112999&postcount=6

<?php

define("CLIENTAREA",true);

include("dbconnect.php");
include("includes/functions.php");

if (isset($aff)) {
    update_query("tblaffiliates",array("visitors"=>"+1"),array("id"=>$aff));
    setcookie("WHMCSAffiliateID", $aff, time()+90*24*60*60);
}

//Custom page code
$destination = "";
if(isset($_GET["p"]))
    $destination = $_GET["p"];

header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$CONFIG["Domain"]."/".$destination);

?>

Links go like this:

<a href="[AffiliateLinkCode]&p=samplefolder/samplepage.php">Sample Page Direct Affiliate Link</a>

This allows you to set specific banners, links, etc. for specific landing pages.

Share

Leave a Comment

Previous post:

Next post: