Jump to content

clickbank code


Gatsu
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...