HTTP extension for PHP 1.6.2 (Default branch)


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements Software Releases - RSS News HTTP extension for PHP 1.6.2 (Default branch)
# 1  
Old 12-05-2008
HTTP extension for PHP 1.6.2 (Default branch)

The HTTP extension for PHP aims to provide a convenient and powerful set of functionality for one of PHP's major applications. It eases handling of HTTP URLs, dates, redirects, headers, and messages, provides means for negotiation of clients' preferred language and charset, as well as a convenient way to send any arbitrary data with caching and resuming capabilities. It provides powerful request functionality if built with CURL support. Parallel requests are available for PHP 5 and greater. License: BSD License (revised) Changes:
This release fixes PHP 5.3 API incompatibilities (including bug #15065). It fixes memory corruption with headers and HttpRequest. It fixes a crash in HttpMessage::unserialize(). It fixes bug #14826 (a race condition in http_request_dtor) and bug #15223 (http_parse_message cuts off more than headers). Image

Image

More...
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question
HEADERS_SENT(3) 							 1							   HEADERS_SENT(3)

headers_sent - Checks if or where headers have been sent

SYNOPSIS
bool headers_sent ([string &$file], [int &$line]) DESCRIPTION
Checks if or where headers have been sent. You can't add any more header lines using the header(3) function once the header block has already been sent. Using this function you can at least prevent getting HTTP header related error messages. Another option is to use Output Buffering. PARAMETERS
o $file - If the optional $file and $line parameters are set, headers_sent(3) will put the PHP source file name and line number where out- put started in the $file and $line variables. o $line - The line number where the output started. RETURN VALUES
headers_sent(3) will return FALSE if no HTTP headers have already been sent or TRUE otherwise. EXAMPLES
Example #1 Examples using headers_sent(3) <?php // If no headers are sent, send one if (!headers_sent()) { header('Location: http://www.example.com/'); exit; } // An example using the optional file and line parameters, as of PHP 4.3.0 // Note that $filename and $linenum are passed in for later use. // Do not assign them values beforehand. if (!headers_sent($filename, $linenum)) { header('Location: http://www.example.com/'); exit; // You would most likely trigger an error here. } else { echo "Headers already sent in $filename on line $linenum " . "Cannot redirect, for now please click this <a " . "href="http://www.example.com">link</a> instead "; exit; } ?> NOTES
Note Headers will only be accessible and output when a SAPI that supports them is in use. SEE ALSO
ob_start(3), trigger_error(3), headers_list(3), header(3) for a more detailed discussion of the matters involved. . PHP Documentation Group HEADERS_SENT(3)