Home > PHP > Whmcs Affiliate Code Mod (php)

Whmcs Affiliate Code Mod (php)

May 19th, 2009

Hello,
We are looking for a quick tweak to the aff.php file from the WHMCS script.

At present, an affiliate link is only able to redirect to 1 domain. We need to be able to allow clients to redirect to multiple different pages, whilst still having the affiliate cookie planted.

Here is what a normal affiliate link currently looks like:

http://www.site.co.uk/whmcs/aff.php?aff=001

Where 001 is the affiliate’s ID. What we’d like to have is this:

http://www.site.co.uk/whmcs/aff.php?aff=001&page=1

Where page=1 is an URL entered by us in the aff.php file…if that makes sense :-)

There should also be some validation in there that doesn’t let the user redirect to a page that hasn’t been defined, eg:

http://www.site.co.uk/whmcs/aff.php?aff=001&page=9999999

As 999999 won’t exist, it should redirect to the standard WHMCS install domain.

Hopefully I’ve managed to get across what we need, if not just let me know if you have any questions.

I’ve attached the current aff.php file so you can see what you are working with.

Thanks,


Whmcs Affiliate Code Mod (php)

Comments are closed.
Bear