GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   NATs users- (https://gfy.com/showthread.php?t=522364)

quantum-x 09-29-2005 08:05 PM

NATs users-
 
How do I change an encoded tracking code back to an affiliate id?
ie -
on a URL like http://www.ravenriley.com/tour1/?nats=NjM6Mzox

Changing the NjM6Mzox

to 'quantumx' and pulling out the other data.

Nasty 09-29-2005 08:12 PM

http://www.opinionatedgeek.com/dotne...e/Default.aspx

quantum-x 09-29-2005 08:17 PM

it's base 64? neat.

quantum-x 09-29-2005 08:27 PM

hmm.. that only takes it back to an ID (ie 634:3:1) and that ID does not directly correspond to the correct affilate id

Verbal 09-29-2005 08:30 PM

I'm waiting for "NATS for Dummies" to come out. I'll be first in line.

TMM_John 09-29-2005 08:51 PM

Quote:

Originally Posted by quantum-x
hmm.. that only takes it back to an ID (ie 634:3:1) and that ID does not directly correspond to the correct affilate id

Quantum-x, that is the campaignid (which is linked to your affiliate id), siteid, and programid (all needed for the code to function).

You should ask the program you are promoting to provide their affiliates with unencrypted link codes (something all NATS programs can do if they choose to do so) which will allow you to link with your affiliate login name and site/program id unencoded.

TheDoc 09-29-2005 08:55 PM

When you goto the linking codes page, choose your Campaign, then the program..

Directly above the linking codes in the menu it says the text below. Click Switch and it will pull up the unencoded codes.

Your Link Codes - Mode: Encoded [Switch]

bdld 09-29-2005 09:14 PM

every nats sponsor should offer unencoded links.

quantum-x 09-29-2005 11:00 PM

If anyone else is interested, I did this to solve my problems.
Perhaps it'll help you, too.

PHP Code:

function getAffiliate($_NATS) {
    list(
$campaignID) = explode(":"base64_decode($_NATS));

    
open_db();
    
$sql "SELECT `a`.`username` FROM `accounts` as `a`,`campaigns` as `c` WHERE `a`.`loginid` = `c`.`loginid` AND `c`.`campaignid` = '$campaignID'";
    
$result mysql_query($sql);
    
$row mysql_fetch_assoc($result);
    
close_db();

    return 
$row['username'];




All times are GMT -7. The time now is 11:42 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123