Zend Download Server - PHP API

Table of Contents

PHP Functions

zend_send_file

Outputs the contents of a file to a client using the ZDS and terminates the script.

Description

void zend_send_file (string $filename [ , string $mime_type [ , string $custom_headers ]])

Parameters
filename
The full path to the file for the download
mime_type
MIME type of the file. The function probes the file, using the list in the mime_type file. If that fails, the file is treated as an application/octet-stream.
custom_headers
User defined HTTP headers that are sent instead of the regular ZDS headers. If nothing is specified, a few essential headers are sent, anyway.
Return Value

zend_send_buffer

Ouputs the contents of a string buffer to a client using ZDS and terminates the script.

Description

void zend_send_buffer (string $buffer [ , string $mime_type [ , string $custom_headers ]])

Parameters
buffer
The actual content for the output
mime_type
MIME type of the file. If nothing is specified, the file is treated as an application/octet-stream.
custom_headers
User defined HTTP headers that will be sent instead of regular ZDS headers. If nothing is specified, a few essential headers are sent, anyway.
Return Value

zds_get_pid

Returns the download server's process ID.

Description

int zds_get_pid (void)

Return Value

The download server's process ID.