Advertisement
Guest User

php code

a guest
Mar 14th, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <center><img src="http://www.mydomain.com/wp-content/uploads/2011/01/bpublic-call-us.png" alt="Call Us 817-522-1111"/></center>
  2. <center>
  3. <?php
  4. include ("PapApi.class.php");
  5.  
  6. $session = new Gpf_Api_Session("http://rep.mydomain.com/scripts/server.php");
  7.  
  8. if(!$session->login("me@mydomain.com", "mypassword")) { // change it here please
  9. die("Cannot login. Message: ".$session->getMessage());
  10. }
  11.  
  12. $clickTracker = new Pap_Api_ClickTracker($session);
  13.  
  14. try {
  15. // save the cookies first, if the parameters exist in the link
  16. $clickTracker->track();
  17. $clickTracker->saveCookies();
  18.  
  19. /* if you also need to save cookies for default affiliate, remove comments from this block
  20. if ($clickTracker->getAffiliate() == null) {
  21. // save default cookies if there were no affiliate parameter in link
  22. $clickTracker->setAffiliateID('bpublic'); // default affiliate
  23. $clickTracker->track();
  24. }
  25. */
  26.  
  27. if ($clickTracker->getAffiliate() != null) {
  28. //echo "Affiliate loaded successfully";
  29. ?>
  30.  
  31. <p>Must Provide Code:<strong><?php echo $clickTracker->getAffiliate()->getValue('refid');?></strong>
  32. </p>
  33. <?php
  34. }
  35. else
  36. {
  37. //echo "Cannot load affiliate";
  38. }
  39. } catch (Exception $e)
  40. {
  41. //die("Error while communicating with PAP: ".$e->getMessage());
  42. }
  43. ?></center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement