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)
-   -   Tech Why isnt this code pulling the CCBill affiliate ID? (https://gfy.com/showthread.php?t=1365437)

Publisher Bucks 06-05-2023 10:54 PM

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 :)

Klen 06-06-2023 12:47 AM

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

redwhiteandblue 06-06-2023 12:57 AM

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!

Publisher Bucks 06-06-2023 10:30 AM

Quote:

Originally Posted by Klen (Post 23141539)
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?

Publisher Bucks 06-06-2023 10:31 AM

Quote:

Originally Posted by redwhiteandblue (Post 23141544)
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?

Klen 06-06-2023 10:59 AM

Quote:

Originally Posted by Publisher Bucks (Post 23141698)
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 ?

redwhiteandblue 06-06-2023 01:07 PM

Quote:

Originally Posted by Publisher Bucks (Post 23141699)
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.

fuzebox 06-06-2023 02:05 PM

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.

Publisher Bucks 06-06-2023 06:34 PM

Quote:

Originally Posted by Klen (Post 23141711)
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.

Publisher Bucks 06-06-2023 06:36 PM

Quote:

Originally Posted by redwhiteandblue (Post 23141750)
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?

The Porn Nerd 06-06-2023 07:38 PM

I have a headache from reading all this shit.


All times are GMT -7. The time now is 07:21 AM.

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