Sending headers with PHP to user browser [3/3]

If you want the user to be prompted to save the data you are Sending, such as a generated PDF file, you can use the Content-Disposition header to supply a recommended filename and force the browser to display the save dialog.

<?php
header
('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="document.pdf"');
readfile('document.pdf');
?> 
To send authentication dialog to user use this code:

<?php
header
("WWW-Authenticate: NTLM");
?> 
Rate this tutorial:                    
- Sending headers with PHP to user browser [3/3] -

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: php sending mail FROM containing .com  php script for sending email on submit  xp concurrent rdp without logging off user  sql sa user password reset  guest user cannot change  how to remote desktop without logging off user  allow remote user mysql connections  microsoft sql reset user password  remote desktop without user logoff  reset database user password