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 to protect your clickbank thank you page from download fraud (really)

Discussion in 'ClickBank' started by tom11011, Aug 14, 2012.

  1. nosyaj

    nosyaj Greenhorn

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #21
    create new file which is PHP. I used wordpress too but created new file using PHP for this.
     
    nosyaj, Jun 4, 2013 IP
  2. tom11011

    tom11011 Well-Known Member

    Messages:
    1,117
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    165
    #22
    It's been a long time since I have looked at this but this script does work. Check your work again, if it just wants to download download.php, sounds like something is up with your php. Also, in order for this to work, clickbank must send you to the download.php file, you cannot go there directly. Setup a test account in clickbank.


     
    tom11011, Jun 4, 2013 IP
  3. nosyaj

    nosyaj Greenhorn

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #23
    Thanks for the prompt reply Tom!
    My script looks exactly like your code. I have set the variable pointing to my file directory path but still my script was pulling the php code itself and not the file. So I modified codes then the pop-up would now download the zip file but the problem it was corrupted. Please check my script.

    //my first script that download the script itself (php) and not the file pointed by the $path variable.

    function download()
    {
    $path = './folder/folder/file.zip';

    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: public");
    header("Content-Description: File Transfer");
    header("Content-Type: application/zip");
    header("Content-Length: " .(string)(filesize($path)) );
    header('Content-Disposition: attachment; filename="'.basename($path).'"');
    header("Content-Transfer-Encoding: binary\n");

    readfile($path);
    exit();
    }

    if (isset($_GET['run'])) $linkchoice=$_GET['run'];
    else $linkchoice='';

    switch($linkchoice){

    case 'first' :
    download();
    break;
    }

    //my modified code but the output was always corrupted

    function download() {
    $myfile = './folder/folder/file.zip';
    header('Pragma: public');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Content-Type: Application/zip');
    header('Content-Disposition: attachment; filename="'.basename($myfile).'"');
    header('Content-Transfer-Encoding: binary');
    header('Content-Length: '.filesize($myfile));
    readfile($myfile);
    flush();

    $fp = fopen($myfile, "r");
    while (!feof($fp))
    {
    echo fread($fp, 65536);
    flush(); // this is essential for large downloads
    }
    fclose($fp);
    exit();
    }

    if (isset($_GET['run'])) $linkchoice=$_GET['run'];

    else $linkchoice='';

    switch($linkchoice){

    case 'first' :
    download();
    break;
    }

    any advise would be appreciated. Thanks ahead..
     
    nosyaj, Jun 5, 2013 IP
  4. nosyaj

    nosyaj Greenhorn

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #24
    The download test was passed through clickbank and I was sent to thankyou page with my download php script. The function cbValid() {....} php script is working for me very good. My problem was the download script.
     
    nosyaj, Jun 5, 2013 IP
  5. tom11011

    tom11011 Well-Known Member

    Messages:
    1,117
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    165
    #25
    ok so you fixed it then?
     
    tom11011, Jun 5, 2013 IP
  6. nosyaj

    nosyaj Greenhorn

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #26
    I would like to say No I didn't fixed it because when I tried to download the file using my script the file is always corrupted/damaged. I'm not a PHP wiz guy and that frustrates me.. :( but thanks to you and your script.
     
    nosyaj, Jun 6, 2013 IP
  7. tom11011

    tom11011 Well-Known Member

    Messages:
    1,117
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    165
    #27
    I recommend you go online and try and find an updated php file download function, maybe there is a better one than I am using. I had trouble downloading a non corrupted file at first too then changed my download function to what is shown above and it works for me. Google 'php download pdf' and there is a lot of stuff.
     
    tom11011, Jun 6, 2013 IP
  8. nosyaj

    nosyaj Greenhorn

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #28
    Thanks man!
     
    nosyaj, Jun 6, 2013 IP
  9. tazogamer

    tazogamer Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #29
    to protect the clickbank download page, you need a small software, like the app on www.ProtectPages.com, and thus, you can easily control files, and edit/change links, protect download links and etc..
     
    Last edited: Jun 21, 2013
    tazogamer, Jun 21, 2013 IP