Jump to content

download protect script getting contents of current page - HELP!


doa24uk

Recommended Posts

Hi guys,

 

I'm half way through a custom built download protection script that does various things. However this is the bit that isn't working....

 

$name = 'file.txt'
$fulldownload = '/files/'.$name;

header('Content-Disposition: attachment; filename="'.$fulldownload.'"');
header('Cache-control: private');

 

Instead of linking straight to the file in questions it actually prints the current page (HTML) and puts it in the txt file to download.

 

I'm so lost!

 

DoA

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.