Conisder just using str_replace("\n", "<br>\n", $your_string) instead of nl2br.
On December 13, 2001 10:10 am, sunny AT wde wrote: > yeah i'll have a look at making the html a lot smaller as well :) i > guess thats a cheap way of tryin to hold out on the machine as much > as possible. > > the <br /> unfortunately happens automatically when i use the nl2br > function before stuff goes into the database. anyway of avoiding > that? > > /sunny > > --- Andrew Brampton <[EMAIL PROTECTED]> wrote: > > Well just looking at the source of your HTML, you could save > > yourself some > > bandwidth by shrinking it a bit. > > For example > > change the <br /> into <br> > > place your JavaScript into a .js file > > remove a lot of the new lines > > also remove the tabs. > > > > Just doing this I changed the file size of a random forum page from > > 21090Bytes to 19192Bytes. > > Thats saved you about 10%. That 2GB a month :) > > > > You could shrink it even more by removing the " around attributes > > in html > > tags (but that may break some browsers) > > > > Also if possible you could get the GZip module installed for > > apache. This > > GZips the pages up, sends them, and then your browser automatically > > ungzips > > them. This only occurs with browsers that support it. But a quick > > test > > changed your 20k file into a 3k file. That even more of an > > improvement for a > > little server side processing. (thats 20GB into 3GB :)). But I > > guess your > > Host wouldn't like to do this for you unless it was your own > > dedicated box. > > > > Hope these suggestions help you some how > > > > Andrew > > ----- Original Message ----- > > From: "sunny AT wde" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, December 13, 2001 1:13 PM > > Subject: Re: [PHP] Need high bandwidth provider for my Asian > > community site > > > > > I also forgot to ask: > > > > > > are messageboards really big bandwidth suckers?? I get about 2000 > > > messages posted a day on my messageboard and I use up nealry 20 > > > > gigs > > > > > with that. Is this normal? > > > > > > My site is - www.barfiCulture.com > > > > > > thanks > > > > > > sunny > > > > > > --- sunny AT wde <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > > > > > I manage an South-Asian community site from the UK (but hosted > > > > in > > > > > > USA) which is currently wolfing down 20 GB per month and is > > > > increasing to about 25 very soon as the popularity grows. > > > > > > > > I've searched the mailing lists, but couldn't find a good > > > > solution. > > > > > > How shall I go about increasing bandwidth? Should I go for a > > > > dedicated boxes? Or does anyone know a host that provides 25-30 > > > > a > > > > > > month fairly cheaply (its a non-commercial site). > > > > > > > > TIA > > > > > > > > sunny > > > > > > > > __________________________________________________ > > > > Do You Yahoo!? > > > > Check out Yahoo! Shopping and Yahoo! Auctions for all of > > > > your unique holiday gifts! Buy at http://shopping.yahoo.com > > > > or bid at http://auctions.yahoo.com > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > To contact the list administrators, e-mail: > > > > [EMAIL PROTECTED] > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Check out Yahoo! Shopping and Yahoo! Auctions for all of > > > your unique holiday gifts! Buy at http://shopping.yahoo.com > > > or bid at http://auctions.yahoo.com > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: > > > > [EMAIL PROTECTED] > > __________________________________________________ > Do You Yahoo!? > Check out Yahoo! Shopping and Yahoo! Auctions for all of > your unique holiday gifts! Buy at http://shopping.yahoo.com > or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]