Reply to To download a pdf file

Your name:

Reply:


Posted by Pablito on 08/17/06 08:18

Hi at all

I want that a visitor of my internet site download a pdf file (12 mega
length) without display it
To make that I tryed many scripts but they do not work
The most simply script that I used is:
<?php
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=newspaper.pdf");
?>
It work!!!
Infact it save the file but not the full file that is 12 M. but only few
Kb.an after isd I open the file it make error.
Then I tryed:
<?php
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=newspaper.pdf");
header("Content-Length: ".filesizenewspaper.pdf);

?>

Then I tryed:
<?
$File="newspepar.pdf";
header("Pragma: public");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: must-revalidate");
header("Content-type: application/pdf");
header("Content-Length: ".filesize($file));
header("Content-disposition: inline; filename=$file");
header("Accept-Ranges: ".filesize($file));
readfile($file);
exit();
?>
but they make Nothing

Please how can I solve the problem?

Thank in advance
Pablito

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация