Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

http_throttle(3) [php man page]

HTTP_THROTTLE(3)							 1							  HTTP_THROTTLE(3)

http_throttle - HTTP throttling

SYNOPSIS
void http_throttle (float $sec, [int $bytes = 40960]) DESCRIPTION
Sets the throttle delay and send buffer size. Note This function should be used in conjunction with http_send_data(3), http_send_file(3) and http_send_stream(3). Note Provides a basic throttling mechanism, which will yield the current process or thread until the entity has been completely sent. Note This may not work as expected with the following SAPI(s): FastCGI. PARAMETERS
o $sec - seconds to sleep after each chunk sent o $bytes - the chunk size in bytes EXAMPLES
Example #1 A http_throttle(3) example Send file with approximately 20 kbyte/s. <?php // ~ 20 kbyte/s # http_throttle(1, 20000); # http_throttle(0.5, 10000); http_throttle(0.1, 2000); http_send_file('document.pdf'); ?> SEE ALSO
http_send_data(3), http_send_file(3), http_send_stream(3), the HttpResponse class if you are using PHP 5.1.0 and above. PHP Documentation Group HTTP_THROTTLE(3)

Check Out this Related Man Page

HTTP_CACHE_ETAG(3)							 1							HTTP_CACHE_ETAG(3)

http_cache_etag - Caching by ETag

SYNOPSIS
bool http_cache_etag ([string $etag]) DESCRIPTION
Attempts to cache the sent entity by its ETag, either supplied or generated by the hash algorithm specified by the INI set- tinghttp.etag.mode. If the clients If-None-Match header matches the supplied/calculated ETag, the body is considered cached on the clients side and a 304 Not Modified status code is issued. A log entry is written to the cache log if the INI settinghttp.log.cache is set and the cache attempt was successful. Note This function may be used in conjunction with http_send_data(3), http_send_file(3) and http_send_stream(3). If this function is used outside the http_send_*() API, it facilitates the ob_etaghandler(3). PARAMETERS
o $etag - custom ETag RETURN VALUES
Returns FALSE or exits on success with 304 Not Modified if the entity is cached. See the INI settinghttp.force_exit for what "exits" means. EXAMPLES
Example #1 A http_cache_etag(3) example <?php http_cache_etag(); http_send_data("data"); ?> SEE ALSO
http_cache_last_modified(3), ob_etaghandler(3), http_match_etag(3), the HttpResponse class if you are using PHP 5.1.0 and above. PHP Documentation Group HTTP_CACHE_ETAG(3)
Man Page

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PHP: at mm:ss.00

I have these two times in the format mm:ss.00 e.g. 25:45.04 25 mins 45 sec 04 mili sec. Can php take 2 of these out out of mysql and add them and print the result ? (1 Reply)
Discussion started by: perleo
1 Replies

2. Shell Programming and Scripting

Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes)

While running script I am getting an error like Few lines in data are not being processed. After googling it I came to know that adding such line would give some memory to it ini_set("memory_limit","64M"); my input file size is 1 GB. Is that memory limit is based on RAM we have on... (1 Reply)
Discussion started by: elamurugu
1 Replies