Gatsu Posted December 7, 2007 Share Posted December 7, 2007 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 More sharing options...
Synook Posted December 7, 2007 Share Posted December 7, 2007 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 More sharing options...
Gatsu Posted December 7, 2007 Author Share Posted December 7, 2007 aaaah that did it =) thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.