Register Blogs Advertise with usHelp Desk Today's Posts Search

Rate this Entry

How to Hide your downloads from the download page. PHP

Share
Submit "How to Hide your downloads from the download page. PHP" to Facebook
Posted 5th May 2012 at 04:22 PM by rmember

OK guys I found this out about a hear ago.
OK On the first page. Your sales page, you put your paypal, or whatever button on. Below is an example

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="ronaldRFarmer@gmail.com">
<input type="hidden" name="item_name" value="Script from http://resalemembership.com">
<input type="hidden" name="amount" value="4.99">
<input type="hidden" name="return" value="http://resalemembership.com/sales.php?k=47&bought=2">
<input type="hidden" name="cancel_return" value="http://resalemembership.com">
<input type="submit" value="Buy Now"><br />
</form>

Look at this line:

<input type="hidden" name="return" value="http://resalemembership.com/sales.php?k=4&bought=2">

We can change these numbers for security and to add different products.


On our next page we add the hidden code for the download product
Keep in mind if you want to keep it even more hidden you can do a bit more coding on this
I'm just showing a method of hideng the file name I will post more
Secure features later


Anyway on our next page The thank you page we put:
Put the file in question in the same directory as we put our thank you page
PHP Code:
<?php
$k 
$_GET['k'];

if(
$k == 4){
$file="fg223 html css and javascript sales letter template.zip"; }

if(isset(
$_GET['bought'])){
if (
file_exists($file)) { header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
}

?>
That pushes the file with out directly showing the file path so you can always change it and keep it more secure.
Hope that helps
-Ron farmer
resalemembership.com/store
Views 650 Comments 0
Total Comments 0

Comments

 


All times are GMT -6. The time now is 07:05 AM.