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_LAST_MODIFIED(3)						 1					       HTTP_CACHE_LAST_MODIFIED(3)

http_cache_last_modified - Caching by last modification

SYNOPSIS
bool http_cache_last_modified ([int $timestamp_or_expires]) DESCRIPTION
Attempts to cache the sent entity by its last modification date. If the supplied argument is greater than 0, it is handled as timestamp and will be sent as date of last modification. If it is 0 or omit- ted, the current time will be sent as Last-Modified date. If it's negative, it is handled as expiration time in seconds, which means that if the requested last modification date is not between the calculated timespan, the Last-Modified header is updated and the actual body will be sent. A log entry will be 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). PARAMETERS
o $timestamp_or_expires - Unix timestamp 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_last_modified(3) example Caching for 5 seconds. <?php http_cache_last_modified(-5); printf("%s ", http_date()); ?> SEE ALSO
http_cache_etag(3), the HttpResponse class if you are using PHP 5.1.0 and above. PHP Documentation Group HTTP_CACHE_LAST_MODIFIED(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