Register Blogs Advertise with usHelp Desk Today's Posts Search

Rate this Entry

How to Hide your downloads from the download page. PHP

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="" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="">
<input type="hidden" name="item_name" value="Script from">
<input type="hidden" name="amount" value="4.99">
<input type="hidden" name="return" value="">
<input type="hidden" name="cancel_return" value="">
<input type="submit" value="Buy Now"><br />

Look at this line:

<input type="hidden" name="return" value="">

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:

$k == 4){
$file="fg223 html css and javascript sales letter"; }

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));

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
Views 824 Comments 0
Total Comments 0



All times are GMT -6. The time now is 12:24 PM.