Does this PHP actually do what I think it does?
Another Warrior very helpfully gave me the PHP code below when I asked in the Main Forum (admittedly the wrong forum to ask though) about showing different buttons to different site visitors, depening on whether they arrived at the site via Clickbank affiliate link, or by some other means.
Here it is:
<?phpHowever, as my current PHP abilities haven't gone far beyond monkey-see-monkey-do, I'm a bit confused about how to implement it.
function getbuynow(){
if(isset($_GET['clickbankidref')){
include('button1.html');
}else{
include('button2.html');
}
}
?>
Then, your 'clickbankidref' above is the part in bold below:
http://somedomain.com?clickbankidref=132142
For example, should button1.html and button2.html actually be button1.jpg and button2.jpg? I assumed they would be but, if not, does the php code insert the html code of those files into the html of the main page, meaning you can use the code to insert alternate text, as well as graphics? And, if so, will that newly inserted html take heed of any css being applied to the main page?
Also, how does the 'clickbankidref' work for the newer type Clickbank affiliate links, which look like this:
http://af2578ro8rbgh65bw0l.hop.clickbank.net/?tid=123ABC
http://www.mydomain.com/?hop=123456
Is 'clickbankidref', therefore, simply the word "hop"? (It can't be that simple... can it? )
Regards,
Tommy.
[^website^]
[Click here for WSO]