Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <center><img src="http://www.mydomain.com/wp-content/uploads/2011/01/bpublic-call-us.png" alt="Call Us 817-522-1111"/></center>
- <center>
- <?php
- include ("PapApi.class.php");
- $session = new Gpf_Api_Session("http://rep.mydomain.com/scripts/server.php");
- if(!$session->login("me@mydomain.com", "mypassword")) { // change it here please
- die("Cannot login. Message: ".$session->getMessage());
- }
- $clickTracker = new Pap_Api_ClickTracker($session);
- try {
- // save the cookies first, if the parameters exist in the link
- $clickTracker->track();
- $clickTracker->saveCookies();
- /* if you also need to save cookies for default affiliate, remove comments from this block
- if ($clickTracker->getAffiliate() == null) {
- // save default cookies if there were no affiliate parameter in link
- $clickTracker->setAffiliateID('bpublic'); // default affiliate
- $clickTracker->track();
- }
- */
- if ($clickTracker->getAffiliate() != null) {
- //echo "Affiliate loaded successfully";
- ?>
- <p>Must Provide Code:<strong><?php echo $clickTracker->getAffiliate()->getValue('refid');?></strong>
- </p>
- <?php
- }
- else
- {
- //echo "Cannot load affiliate";
- }
- } catch (Exception $e)
- {
- //die("Error while communicating with PAP: ".$e->getMessage());
- }
- ?></center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement