Re: PHP4/Apache2 Content-Length stripped?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stoian Ivanov wrote:
> I'm writing a wap download script involving dynamic image resizing and so
> on. I've notice that some phones are quitting in the mids of http
> transfer.
> After looking further I found out that headers() is sometimes ignored or
> stripped. I've googled around and found in a perl forum that flush-ing
> helps but in PHP4.3.10/Apache2/Gentoo/linux2.6  it seems to not help (at
> least in my configuration) Is there a work-around or something...
>            (I'm going to post same question in apache's mailiing list..)

WILD GUESS

It sounds like the phones are simply ignoring any image larger than X bytes.

Seems to me, then, that your best option is to set up your dynamic
resizing to down-sample, shrink, or color-reduce your image until it hits
X or lower for that phone -- maybe even all phones.

In other words, if your current script only gets an image down to 2X
bytes, have it call another script to be even more aggressive in shrinking
that image down -- Or iterate down through a series of changes until you
get the size down.

'Twould be nice if imagepeg() and friends had an imagejpegestimatedsize()
but you'll just have to play with imagejpeg and ob_start to capture the
size and find out if it's small enough.

Do phone users ever really want to download an image larger than X? 
Probably not.  So don't ask them to.

-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux