hi. i'm not too good with computers but hopefully one of you genius kids can, kinda help me out.
i'm currently selling a product called neurolotion recipe (its my secret recipe to get rid of spider veins, all text, basically a big e-book), and i'm using http://www.clickbank.com because they can accept credit cards for me, without me having to buy the machine.
now what usually happens is, when someone purchases the book, it takes them to my own personal thank you page, in this thank you page, im so computer illiterate that since i don't want to have to deal with e-mails, i just placed a link that they can download from, it looks like this http://www.neurolotionx.com/thankyousite now on this page i made a link that looks like this http://www.neurolotionx/book/neurolotionsecrets.exe
if someone buys my product, and knows that the download is there forever they can just start distributing my book. now i read this today at the clickbank website
http://clickbank.com/crypto.html
i dont know what exactly that means, but i guess when someone buys my product it sends them a link, only for them to use and no one else.
basically what i want to accomplish is, when someone buys my book, either through my email automatically some how they receive the product, or some other way. i know how to password protect the thing, but i don't want to have it on a open website like http://www.neurolotionx/book/neurolotionsecrets.exe
where everyone can just come and download and give it away
thank you. sorry its so long!
im not too good with computers but hopefully a genius helps
Moderator: General Moderators
-
findingkneemo
- Forum Newbie
- Posts: 3
- Joined: Sun Jan 23, 2005 6:29 am
I hate to break it to you, but anyone who downloads it once can put it up on his webpage and distribute it anyway. This simply is what any software or other publisher has to deal with.
First thing I would do is add some kind of authorisation to your website and only distribute the username and password for the buyer. With that you have some kind of control over how many times he downloads it and might revoke access if it it get out of hand.
This would be the easiest solution as it requires the least knowledge.
First thing I would do is add some kind of authorisation to your website and only distribute the username and password for the buyer. With that you have some kind of control over how many times he downloads it and might revoke access if it it get out of hand.
This would be the easiest solution as it requires the least knowledge.
-
findingkneemo
- Forum Newbie
- Posts: 3
- Joined: Sun Jan 23, 2005 6:29 am
uh-oh breast alert ;p
for example you could store which usercode (unique for each customer)
has access to download which file. the thankyou page would have to take care of that.
it's a bit simplified, but here is how it goes grosso-modo
then you also need a download page
for example you could store which usercode (unique for each customer)
has access to download which file. the thankyou page would have to take care of that.
it's a bit simplified, but here is how it goes grosso-modo
Code: Select all
<?php
function passwordgen($length = 8)
{
$result = '';
$alfabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$len = strlen($alfabet) - 1;
for ($i = 0; $i < $length; ++$i)
{
$index = mt_rand(0, $len);
$result .= $alfabet{$index};
}
return $result;
}
$usercode = passwordgen(5);
$query = "INSERT INTO sale VALUES ('$usercode', '5')";
$result = mysql_query($query);
echo "You can surf to our download.php page an download with code $usercode";then you also need a download page
Code: Select all
<?php
if (!isset($_POSTї'usercode']))
{
exit();
}
$usercode = mysql_escape_string($usercode);
$query = "SELECT * FROM sale WHERE usercode=$usercode";
$result = mysql_query($query);
if (!$result)
{
exit();
}
$row = mysql_fetch_assoc($result);
if (!$row)
{
exit();
}
if ($rowї'count'] <= 0)
{
exit();
}
$query = "UPDATE sale SET count=count-1 WHERE usercode='$usercode'";
mysql_query($query);
$file = $rowї'file'];
$size = filesize($file);
$content = mime_content_type($file);
$name = basename($file);
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-length: $size");
header("Content-type: $content");
header("Content-Disposition: attachment; filename=$name");
readfile($file);
?>