1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do I protect my "Thank You" download Page.

Discussion in 'ClickBank' started by jasonwilks, Sep 23, 2006.

  1. #1
    Hi there, I have been trying for days now, trying to figure out how to make my "Thank You" page for clickbank sales, the page where users are able to download my product after purchasing. Right now, anybody can simply just type in the URL to my download page and simply download my product.

    I want to protect this page by making it visible only to paying customers. I having no coding or scripting skills what so ever. I was wondering how I go about doing this?

    Looking at clickbank's site, they provide these two scripts to use:


    PHP SOURCE:

    function cbValid()
    { $key='YOUR SECRET KEY';
    $rcpt=$_REQUEST['cbreceipt'];
    $time=$_REQUEST['time'];
    $item=$_REQUEST['item'];
    $cbpop=$_REQUEST['cbpop'];

    $xxpop=sha1("$key|$rcpt|$time|$item");
    $xxpop=strtoupper(substr($xxpop,0,8));

    if ($cbpop==$xxpop) return 1;
    else return 0;
    }


    ---------



    PERL SOURCE:

    sub cbValid
    { my($q,$key,$rcpt,$time,$item,$cbpop,$xxpop);
    $key='YOUR SECRET KEY';

    $q='&'.$ENV{'QUERY_STRING'};
    $q=~/\Wcbreceipt=(\w+)/; $rcpt=$1;
    $q=~/\Wtime=(\w+)/; $time=$1;
    $q=~/\Witem=(\w+)/; $item=$1;
    $q=~/\Wcbpop=(\w+)/; $cbpop=$1;

    use Digest::SHA1 qw(sha1_hex);
    $xxpop=uc(substr(sha1_hex("$key|$rcpt|$time|$item"),0,8));
    return 1 if $cbpop eq $xxpop;
    return 0;
    }


    Now, I have no clue how to implement these scripts into my "Thank You Download" page. Can somebody please tell me how to do this?
     
    jasonwilks, Sep 23, 2006 IP
  2. Todd

    Todd Active Member

    Messages:
    63
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #2
    Haven't tested this but something like what's below should get you started.

    <?PHP
    function cbValid()
    { $key='YOUR SECRET KEY';
    $rcpt=$_REQUEST['cbreceipt'];
    $time=$_REQUEST['time'];
    $item=$_REQUEST['item'];
    $cbpop=$_REQUEST['cbpop'];

    $xxpop=sha1("$key|$rcpt|$time|$item");
    $xxpop=strtoupper(substr($xxpop,0,8));

    if ($cbpop==$xxpop) return 1;
    else return 0;
    }

    if (cbValid()) {
    echo "Your thank you page contents";
    } else {
    header("Location: $successpage"); /* redirect */
    exit;
    }
    ?>
     
    Todd, Sep 23, 2006 IP
  3. jasonwilks

    jasonwilks Well-Known Member

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    111
    #3
    Thanks for the help, but I still can't seem to get it to work, this is what I have tried, I made a file called blahblahblah.php, and put this in it:



    <?PHP
    function cbValid()
    { $key='w8shv90shvhs;
    $rcpt=$_REQUEST['cbreceipt'];
    $time=$_REQUEST['time'];
    $item=$_REQUEST['item'];
    $cbpop=$_REQUEST['cbpop'];

    $xxpop=sha1("$key|$rcpt|$time|$item");
    $xxpop=strtoupper(substr($xxpop,0,8));

    if ($cbpop==$xxpop) return 1;
    else return 0;
    }

    if (cbValid()) {
    echo "<html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <META name="robots" content="noindex, nofollow">
    <title>congratulations</title>
    </head>


    <body>

    The contents of the Thank You page here...

    </body>

    </html>";
    } else {
    header("Location: $successpage"); /* redirect */
    exit;
    }
    ?>
     
    jasonwilks, Sep 24, 2006 IP
  4. Todd

    Todd Active Member

    Messages:
    63
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #4
    blahblahblah.php has a $key statement with a missing closing quote and in your echo, you will need to escape the quotes...instead of " put \".

    What specific error were you getting?
     
    Todd, Sep 24, 2006 IP
  5. motheninja

    motheninja Peon

    Messages:
    302
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    try this...
    <?
    function cbValid()
    { $key='w8shv90shvhs;
    $rcpt=$_REQUEST['cbreceipt'];
    $time=$_REQUEST['time'];
    $item=$_REQUEST['item'];
    $cbpop=$_REQUEST['cbpop'];

    $xxpop=sha1("$key|$rcpt|$time|$item");
    $xxpop=strtoupper(substr($xxpop,0,8));

    if ($cbpop==$xxpop) return 1;
    else return 0;
    }

    if (cbValid()) {
    echo '<html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <META name="robots" content="noindex, nofollow">
    <title>congratulations</title>
    </head>


    <body>

    The contents of the Thank You page here...

    </body>

    </html>';
    } else {
    header("Location: http://yourdomain.com/badvisitor/url"); /* redirect */
    exit;
    }
    ?>

    in the echo ' statement above, after the first ' you'll have to escape all following ' or you can go with the " and again will have to escape all the following ". By escaping I mean putting a \ in front of the ", as in:

    echo "this is a quote \", and here I end my statement.";
     
    motheninja, Sep 25, 2006 IP
  6. mangozoom

    mangozoom Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    why not put your landing page on a completey different site ... with no keywords, metatags or description
     
    mangozoom, Sep 25, 2006 IP
  7. jasonwilks

    jasonwilks Well-Known Member

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    111
    #7
    Ok, I can hide the Thank-You page now just fine, works well. But now I am wondering is there a way that I can mask the download of the product too?

    Right now any user can see the full path and URL of the download. Is there a way to hide this?
     
    jasonwilks, Sep 30, 2006 IP
  8. motheninja

    motheninja Peon

    Messages:
    302
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    yeah... use .htaccess and .httpwd. google it.
     
    motheninja, Sep 30, 2006 IP
  9. suttree

    suttree Guest

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    what is .htaccess?
     
    suttree, Oct 4, 2006 IP
  10. latiff

    latiff Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    You can install software suited for this purpose, of which there are many:-

    http://www.google.com.sg/search?hl=en&q=clickbank+download+page+protector&btnG=Google+Search&meta=

    The price ranges very widely and while some offer additional installation services for you, others don't.

    If you're not yet willing to invest time and money to do this, you can still create a few directories with restricted .htaccess and keep changing the location of your Thank You download page once every few days.
     
    latiff, Oct 12, 2006 IP