I'm currently building an affiliate program (a bit like CJ) with Paypal checkout. When people sign up as an affiliate (=to sell their own products from their own website) they receive 2 php lines that they have to insert into their shop.
In the header:
<?php include 'http://www.mydomain.com/tracker/tracker.php?xyz='.$_GET[xyz]; ?>
In the Paypal button:
<input type="text" name="notify_url"
value ="http://www.mydomain.com/ipn.php?xyz=<?php echo $_GET[xyz]; ?>" +
style="width:1px; height:1px; border:0">
The first part basically sets the cookie while the second forwards a return url to Paypal so that when someone decides to buy, this gets returned to us. I've not made the second part hidden as I want to be able to check whether the affiliates have really added the code.
This all works fine in simple hand-written PHP but it all goes wrong when these affiliates are using databases. Their scripts will then probably echo something like $row['paypal'] which will literally show the inserted lines and not parse the $_GET.
I have absolutely no clue as to how this gets resolved. If possible I would like something that I could fix on my side as I don't want to annoy my affiliates with lots of customization on their side as they are mainly non-technical people.