Why isnt this code pulling the CCBill affiliate ID?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Publisher Bucks
    Confirmed User
    • Oct 2018
    • 1330

    #1

    Tech Why isnt this code pulling the CCBill affiliate ID?

    I'm using the following php code, which I was under the impression should allow me to pull the &PA=AFFILIATEID from a standard CCBill link:

    Code:
    http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=XXXXXX-0000&PA=AFFILIATEID
    Code:
    <?php
    $affiliateCode = isset($_GET['PA']) ? $_GET['PA'] : '';
    ?>
    Then using the following to try and display the code in index.php (just a normal html page with .php extension:

    Code:
    <?php echo $affiliateCode; ?>
    But it isn't working, what am I missing please?

    I notice when you use CCBill links there is a redirect to the main https://www.domain.com of the site, is there a way to capture the affiliate code prior to the redirect happening (or an easier way I'm missing)?

    Thanks for any advice, feedback, solutions
    Extreme Link List - v1.0
  • Klen
    • Aug 2006
    • 32235

    #2
    Are you pulling ccbill link from browser bar or from variable ?

    Comment

    • redwhiteandblue
      Bollocks
      • Jun 2007
      • 2793

      #3
      Those $_GET params are only available to the script that they are applied to, i.e. refer.ccbill.com/cgi-bin/clicks.cgi - they are not available to the script it redirects to. That would be a massive massive security and privacy flaw, if one script could read another script's parameters!
      Interserver unmanaged AMD Ryzen servers from $73.00

      Comment

      • Publisher Bucks
        Confirmed User
        • Oct 2018
        • 1330

        #4
        Originally posted by Klen
        Are you pulling ccbill link from browser bar or from variable ?
        From the browser but I guess it could also be pulled from code within the tour itself?
        Extreme Link List - v1.0

        Comment

        • Publisher Bucks
          Confirmed User
          • Oct 2018
          • 1330

          #5
          Originally posted by redwhiteandblue
          Those $_GET params are only available to the script that they are applied to, i.e. refer.ccbill.com/cgi-bin/clicks.cgi - they are not available to the script it redirects to. That would be a massive massive security and privacy flaw, if one script could read another script's parameters!
          Ah okay, any suggestions on how I can get that parameter or set it on another area of the site tour?
          Extreme Link List - v1.0

          Comment

          • Klen
            • Aug 2006
            • 32235

            #6
            Originally posted by Publisher Bucks
            From the browser but I guess it could also be pulled from code within the tour itself?
            Just to confirm, when you click on h*tp://refer.ccbill.com/cgi-bin/clicks.cgi?CA=XXXXXX-0000&PA=AFFILIATEID, it loads your site with your code, correct ?

            Comment

            • redwhiteandblue
              Bollocks
              • Jun 2007
              • 2793

              #7
              Originally posted by Publisher Bucks
              Ah okay, any suggestions on how I can get that parameter or set it on another area of the site tour?
              CCBill doesn't pass the parameters through so the only way you can possibly get them is by looking at the referrer string ($_SERVER["http_referer"]) but that would be terribly unreliable since whether the referrer string is present depends on many things including the level of privacy set in the user's browser.

              You would have to take a different approach and get affiliates to send traffic to a landing page on your site which captures the params, constructs the CCBill URL with them and then redirects to it, which will then redirect the user back to your home page.
              Interserver unmanaged AMD Ryzen servers from $73.00

              Comment

              • fuzebox
                making it rain
                • Oct 2003
                • 22351

                #8
                Sometimes I think you're just lazy and don't want to use the correct resources, and then you post something like this and I realize you don't even have a grasp of the basic fundamentals of how the web works.

                Comment

                • Publisher Bucks
                  Confirmed User
                  • Oct 2018
                  • 1330

                  #9
                  Originally posted by Klen
                  Just to confirm, when you click on h*tp://refer.ccbill.com/cgi-bin/clicks.cgi?CA=XXXXXX-0000&PA=AFFILIATEID, it loads your site with your code, correct ?
                  it does yes.

                  Correction, it credits the sale to the AFFILIATEID, it doesn't show the actual affiliate ID anywhere in the page code.
                  Extreme Link List - v1.0

                  Comment

                  • Publisher Bucks
                    Confirmed User
                    • Oct 2018
                    • 1330

                    #10
                    Originally posted by redwhiteandblue
                    CCBill doesn't pass the parameters through so the only way you can possibly get them is by looking at the referrer string ($_SERVER["http_referer"]) but that would be terribly unreliable since whether the referrer string is present depends on many things including the level of privacy set in the user's browser.

                    You would have to take a different approach and get affiliates to send traffic to a landing page on your site which captures the params, constructs the CCBill URL with them and then redirects to it, which will then redirect the user back to your home page.
                    Gotcha, so basically i'd have to do something along the lines of a clicks.php which then redirects to the site instantly and carry the affiliate ID across to both the URL and the additional field where I want it to appear?
                    Extreme Link List - v1.0

                    Comment

                    • The Porn Nerd
                      Living The Dream
                      • Jun 2009
                      • 19787

                      #11
                      I have a headache from reading all this shit.
                      My Affiliate Programs:
                      Porn Nerd Cash | Porn Showcase | Aggressive Gold

                      Over 90 paysites to promote!
                      Now on Teams: peabodymedia

                      Comment

                      Working...