[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
Utilities for handling HTTP related tasks
Author: | Andreas Gohr |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
File Size: | 349 lines (10 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
http_conditionalRequest($timestamp) X-Ref |
Checks and sets HTTP headers for conditional HTTP requests returns: void or exits with previously header() commands executed param: int $timestamp lastmodified time of the cache file link: http://simonwillison.net/2003/Apr/23/conditionalGet/ author: Simon Willison <swillison@gmail.com> |
http_sendfile($file) X-Ref |
Let the webserver send the given file via x-sendfile method returns: void or exits with previous header() commands executed param: string $file absolute path of file to send author: Chris Smith <chris@jalakai.co.uk> |
http_rangeRequest($fh, $size, $mime) X-Ref |
Send file contents supporting rangeRequests This function exits the running script param: resource $fh - file handle for an already open file param: int $size - size of the whole file param: int $mime - MIME type of the file author: Andreas Gohr <andi@splitbrain.org> |
http_gzip_valid($uncompressed_file) X-Ref |
Check for a gzipped version and create if necessary return true if there exists a gzip version of the uncompressed file (samepath/samefilename.sameext.gz) created after the uncompressed file return: bool param: string $uncompressed_file author: Chris Smith <chris.eureka@jalakai.co.uk> |
http_cached($cache, $cache_ok) X-Ref |
Set HTTP headers and echo cachefile, if useable This function handles output of cacheable resource files. It ses the needed HTTP headers. If a useable cache is present, it is passed to the web server and the script is terminated. param: string $cache cache file name param: bool $cache_ok if cache can be used |
http_cached_finish($file, $content) X-Ref |
Cache content and print it param: string $file file name param: string $content |
http_get_raw_post_data() X-Ref |
Fetches raw, unparsed POST data return: string |
http_status($code = 200, $text = '') X-Ref |
Set the HTTP response status and takes care of the used PHP SAPI Inspired by CodeIgniter's set_status_header function param: int $code param: string $text |