30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Zend Download Server - PHP API<br />

Table of Contents<br />

• Zend Download Server functions<br />

API <strong>Reference</strong><br />

o zend_send_file - Outputs the contents of a file to a client using the ZDS and terminates<br />

the script.<br />

o zend_send_buffer - Ouputs the contents of a string buffer to a client using ZDS and<br />

terminates the script.<br />

o zds_get_pid - Returns the download server's process ID.<br />

PHP Functions<br />

zend_send_file<br />

Outputs the contents of a file to a client using the ZDS and terminates the script.<br />

Description<br />

void zend_send_file (string $filename [ , string $mime_type [ , string<br />

$custom_headers ]])<br />

Parameters<br />

filename<br />

The full path to the file for the download<br />

mime_type<br />

MIME type of the file. The function probes the file, using the list in the mime_type file. If that fails,<br />

the file is treated as an application/octet-stream.<br />

custom_headers<br />

User defined HTTP headers that are sent instead of the regular ZDS headers. If nothing is<br />

specified, a few essential headers are sent, anyway.<br />

Return Value<br />

265

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!