[PHP] Content-Length

2002-07-04 Thread Grant

Hi

I am currently having problems with a custom written
web-authentication-proxy.  The proxy works fine with standard html pages but
not with php pages.  After doing a bit of digging I have found that the
proxy does a HEAD request and checks the Content-Length to see if the page
if valid.

I have been able to use

Header( Content-Length: 100 )

to fool the proxy into loading the php page.

My question is how do I go about calculating the correct Content-Length for
each and every php page on my site.

I have done some digging and presume I need to do Output buffering and
calculate the strlen of the response the php returns, but how do I reference
the result of a php page to get a strlen from it??

Any assistance would be welcome

Thanks

Grant




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Content-Length

2002-07-04 Thread Daniel Tryba

On Thu, Jul 04, 2002 at 01:24:04PM +0200, Grant wrote:
 My question is how do I go about calculating the correct Content-Length for
 each and every php page on my site.
 
 I have done some digging and presume I need to do Output buffering and
 calculate the strlen of the response the php returns, but how do I reference
 the result of a php page to get a strlen from it??

You didn't dig far enough, since there is an example of exactly what you
want on:

http://www.php.net/manual/en/function.ob-get-length.php

Isn't the online reference need? :)

-- 

  Daniel Tryba


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php