Posted by: prajapatinilesh | December 13, 2007

Forcing a File Download

<?php
header(‘Content-Length: ‘.$fileSize);
header(‘Content-Type: ‘.$mimeType);
header(‘Content-Disposition: attachment; filename=”‘.$fileName.'”‘);
header(‘Content-Transfer-Encoding: binary’);
header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0’);
@readfile($path); ?>

Advertisements

Responses

  1. this files are work vary good.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: