Jump to content

clickbank code


Gatsu

Recommended Posts

hi, I am selling a downloadable product with clickbank and would like the download site to be protected from people who didnt pay and clickbank told me to use this php code. Does anybody know how to use this? I enter my secret key and add the code to the top of the page but I can still enter the site trough the regular link.

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;}

Link to comment
Share on other sites

You can call that function at the top of the pages, and stop script execution if it returns 0, e.g.

//This goes just after the function is defined (before output)if (!cbValid()) die ("You didn't pay!");

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...