Posted by Toby A Inkster on 03/09/07 02:47
ircmaxell wrote:
> I'm working on a php project modifying a CMS. I need to be able to
> view the headers that the script is sending at runtime. In php5, I can
> use headers_list(), but I'm using php4.
You could try defining your own replacement for the header() function:
function _header ($x)
{
$GLOBALS['HEADERS'][] = $x;
header($x);
}
Wherever your code calls header(), replace it with _header(). Then you
can use something like this:
function _headers_list ()
{
return $GLOBALS['HEADERS'];
}
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
[Back to original message]
|