Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php script for ClickBank multiple landing pages - advice sought

Status
Not open for further replies.

ripplemeg

Technical User
Jun 19, 2003
2
GB
Hi,

I hope you can help. I'm completely new to php and am trying to use a redirect script to set up multiple ClickBank landing pages, but something's gone wrong.

I was given some advice on how to do it but I obviously messed up somewhere along the line and would appreciate an expert eye being cast over what I've done as I'm not sure what the problem is.

Any advice you can give me would be gratefully received!

My ClickBank nickname is major. I currently have 3 products
being sold through ClickBank. They are at -

I created redir.php and uploaded it to my server as follows -

==========================
<?
if(!$pa){
$pa=1;
}

$num = array(
1 => &quot;2 => &quot;3 => &quot;);
Header( &quot;Location: $num[$pa]&quot;);
?>
==========================

I created and uploaded click.php as follows -

==========================
<?
$loc = &quot;Header( &quot;Location: $loc&quot;);
setcookie (&quot;pa&quot;,&quot;&quot;, time() -10000, &quot;/&quot;, &quot;.4future-trading.com&quot;,
0); file://setting a new cookie
setcookie (&quot;af&quot;,&quot;&quot;, time() -10000, &quot;/&quot;, &quot;.4future-trading.com&quot;,
0); file://setting a new cookie
setcookie (&quot;pa&quot;,$p, time() +86400, &quot;/&quot;, &quot;.4future-trading.com&quot;,
0); file://setting a new cookie
setcookie (&quot;af&quot;,$a, time() +86400, &quot;/&quot;, &quot;.4future-trading.com&quot;,
0); file://setting a new cookie
?>
==========================

Before doing all this I created and uploaded a test.php file and that worked fine.

My ClickBank home page had been set to but I changed it to
When I then tried going to
(hoping this would take me to /midas.html) I got the following
error message -

Parse error: parse error in
/home2/sites/adc/4future-trading.com/web/click.php on line 4

I'm afraid I'm a bit of a technophobe and php is completely new to me, so it's quite likely I've made some glaring error, but alas I don't know what it is!! Can you see where I've gone wrong and what I need to do to fix it?

For the meantime I've just reset my ClickBank home page to

Thanks for any help you're able to give.

Regards,
Andrew
 
It's hard for us to comment for two reasons... one you didn't put you code in code tags, so we can't quite know for sure what your code looks like. For two, I'm not 100% sure which is line 4, I'm guessing it's

Code:
setcookie (&quot;pa&quot;,&quot;&quot;, time() -10000, &quot;/&quot;, &quot;4future-trading.com&quot;,0);  file://setting a new cookie

A few things to note though....
after issuing a
Code:
Header(&quot;location: ...&quot;);
command, you're done with your page... you can't put any code after that, or rather you can, but it will never execute.

The error you're getting is telling you that you basically have some sort of typo on or before line 4, but without those code tags it'll be very hard to diagnose.

-Rob
(Click on the Process TGML link under Step 2 for instructions on using the code tags)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top