Kako zavarovati Clickbank izdelek?
2 naročnika
2 naročnika
Eno vprašanje preden grem spat. A pozna kdo kak dober način kako zavarovati nek izdelek ki ga prodajaš preko clickbanka? ne mislim met statičnih htčmrlj strani da mi lahko vsak froc najde download link v guglu, zavaroval vi download page pa nevem kak, rad bi eno poceni zadevo ali pa še bolje free varianto
tole sem našel na netu ampak ne znam programirat v phpju tako da mi prav nič ne pomaga
<?php
$delivery = "/var/delivery.pdf";
$rcpt=$_REQUEST['cbreceipt'];
$time=$_REQUEST['time'];
$item=$_REQUEST['item'];
$cbpop=$_REQUEST['cbpop'];
$cbstr = "$rcpt,$time,$item,$cbpop";
$phpself = basename(__FILE__);
$_SERVER['PHP_SELF'] = substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'],$phpself)) . $phpself;
if ($_GET['action'] == "download") {
if ($_COOKIE['ValidUser']) {
if (md5($cbstr) == $_COOKIE['ValidUser']) {
$fh = fopen($delivery,'r');
header( "Content-type: application/pdf");
while (!feof($fh)) {
$buffer = fread($fh,4096);
print $buffer;
}
}
}
}
if (cbValid($rcpt,$time,$item,$cbpop)) {
$cbstr = "$rcpt,$time,$item,$cbpop";
$value = md5($cbstr);
setcookie("ValidUser", $value, time()+3600);
?>
<title> Good monkey </title>
You deserve a cookie.
<a href="<?echo $_SERVER['PHP_SELF']?>?action=download">Download now!</a>
<?
} else {
?>
<title> Bad Monkey </title>
Please don't steal my lame ebook. I spent countless minutes copying and pasting from other sources. I also like free shit, so plz pay me.
K. thx.
<?
}
function cbValid($rcpt,$time,$item,$cbpop)
{
$key='YOUR SECRET KEY';
$xxpop=sha1("$key|$rcpt|$time|$item");
$xxpop=strtoupper(substr($xxpop,0,8));
if ($cbpop==$xxpop) return 1;
else return 0;
}
?>