Passing a subid to the merchant within a PHP redirect

Status
Not open for further replies.
pfft, try this:

Code:
<?php
print nl2br( print_r( $_GET, true ));
$subid=trim( $_GET['number'] );
$dest= "hxxp://publishers.xy7.com/z/43422/CD3149/".$subid;

die( "my destination is <a href=\"$dest\">$dest</a>.<br />\n" );

?>

And then click on your link to make sure
1) _GET has what you expect
2) your script has the right subid appended
3) your network accepts your subid.
 


Apparently this has already been solved, but by looking at your code, you're trying to make the $subID variable equal to the 'number' parameter in the url string, correct? It's not really clear exactly what you're trying to accomplish.

The following line:

Code:
$subID = $_GET['number'];

Implies that the URL looks something like this:

http://www.site.com/redirect.php?number=1234

At this point, $subID = 1234

The point that Webcyte was trying to make is that we are missing a core piece of functionality here. In order for this script to do what you want, there's a step you're not showing us, which is probably where your problem is.

A more functional snippet of code should look like this:

Code:
//Assuming your DBMS is MySQL and you have already established a connection

$subID = $_GET['number'];

$queryString = "select keyword from mytable where subid = '$subID'";

$keyWord = mysql_result(mysql_query($querySTring), 0, 0);

mysql_query("update mytable set clickcount = clickcount + 1 where subid = $subID");

//Now you have cross referenced your subID and the real keyword in your database

header("Location: hxxp://publishers.xy7.com/z/43422/CD3149/$keyWord");
 
He doesn't care about cross referencing at this point. He needs to pass the subid which is an auto-incremented number.

1. He passes the number to XY7.com (this is the only thing that is not happening correctly at this point)
2. He then will download his subid stats from XY7.com (currently there are none because it is not being passed correctly)
3. At this point he will then cross reference his downloaded stats with his database to see which keyword was used to make the sale.

There's no need for this to be complicated. The whole point in his process is to NOT pass the keyword to XY7 but instead a number that means nothing to THEM but matches a line in his database which is associated with the correct keyword. The piece of code that everyone is saying is missing is the part where he inserts a line into his database that includes the keyword and the auto-incremented ID. In this troubleshooting instance, that is completely irrelevant to us.

OP, try the code I gave you and see if it works.
 
Can't you guys read!? HE ALREADY SOLVED THIS PROBLEM!

He opted to blame it on the network he is working with, and is expecting them to fix it. :D
 
Can't you guys read!? HE ALREADY SOLVED THIS PROBLEM!

He opted to blame it on the network he is working with, and is expecting them to fix it. :D
Wow, you're a douche bag and can't read either. I've tried the code myself, and the variable does get passed on to the CPA network. Just try following my steps for using "web page privacy report" in Internet Explorer, and you'd see that it gets passed on to XY7's URL properly.

If you were trying to be sarcastic, well, that gets lost over the internet last time I checked.
 
Wow, you're a douche bag and can't read either. I've tried the code myself, and the variable does get passed on to the CPA network. Just try following my steps for using "web page privacy report" in Internet Explorer, and you'd see that it gets passed on to XY7's URL properly.

If you were trying to be sarcastic, well, that gets lost over the internet last time I checked.

Look genius, if there was something wrong with the bit of code he did post, I would have pointed that out in the first place. The fact that there was nothing wrong with the code that he DID post means that somewhere else along the line, something is wrong. You can look at my little 5-step outline to see what I mean.

Anyway, he rejoiced about solving his problem by believing the CPA network is broken...which I doubt, because then all the affiliates on that network would have a problem passing sub_ids and not just ImagesOfLittleBoysAndJohu.
 
Anyway, he rejoiced about solving his problem by believing the CPA network is broken...which I doubt, because then all the affiliates on that network would have a problem passing sub_ids and not just ImagesOfLittleBoysAndJohu.
God knows that no network or merchant ever has a problem. Sorry, I guess I should bow down and worship WeBsHiT (because apparently making bad jokes out of someone's username is really the cool thing to do, especially for a new member here at WF).

Oh, and yeah, you're banned. Guess you shouldn't break the rules about advertising here, and then go and troll.
 
Sorry to bump the thread, as my original problem turned out not to be a problem on my end.

But I just wanted to say thanks to everyone who contributed (minus that troll) and tried to help me here. I learned some things too. :)

Now onto making more money...
 
Status
Not open for further replies.