AW: AW: [PHP] Cache Database-driven site

2001-03-13 Thread Joe Maier

Aaron,

this is obviously exactly what i need!!
Thanks a lot - this saved me days of work!

Joe

-Ursprungliche Nachricht-
Von: Aaron Tuller [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 13. Marz 2001 05:41
An: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Betreff: Re: AW: [PHP] Cache Database-driven site


all you need to do is wrap your pages in:

ob_start();

// your code

$page = ob_get_contents();

// write $page to a file or whatever you want to do

and then depending on if this script is being called by cron or just
when people load the page you can either do an ob_end_flush() or
ob_end_clean()

it's easy.

At first I didn't beleive output buffering was that cool, now I thnk
it's one of the best things PHP has to offer.  You can use it for a
lot of things, check it out.

-aaron

At 12:40 AM +0100 3/13/01, Joe Maier wrote:
>Aaron,
>i would love to believe what you say.
>But i couldn't find any buffering functions in the online docs.
>
>Could you please gimme a pointer on where i can find these functions
>and what's their name. Are they available in php3?
>
>Thanks a lot,
>Joe
>
>-Ursprungliche Nachricht-
>Von: Aaron Tuller [mailto:[EMAIL PROTECTED]]
>Gesendet: Montag, 12. Marz 2001 23:26
>An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Betreff: Re: [PHP] Cache Database-driven site
>
>
>At 11:19 PM +0100 3/12/01, Joachim Maier wrote:
>>To create the HTML-cache page i need to build the whole HTML-page content
>in
>>memory, instead of echoing it back to the user's browser, and finally
write
>>it to disk. That means, i have to write all HTML in php-code. I can't just
>>embed php-parts in html tags.
>
>that's not true.  see the output buffering functions.
>
>-aaron
>
>--
>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]


--
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]


-- 
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]




Re: AW: [PHP] Cache Database-driven site

2001-03-12 Thread Aaron Tuller

all you need to do is wrap your pages in:

ob_start();

// your code

$page = ob_get_contents();

// write $page to a file or whatever you want to do

and then depending on if this script is being called by cron or just 
when people load the page you can either do an ob_end_flush() or 
ob_end_clean()

it's easy.

At first I didn't beleive output buffering was that cool, now I thnk 
it's one of the best things PHP has to offer.  You can use it for a 
lot of things, check it out.

-aaron

At 12:40 AM +0100 3/13/01, Joe Maier wrote:
>Aaron,
>i would love to believe what you say.
>But i couldn't find any buffering functions in the online docs.
>
>Could you please gimme a pointer on where i can find these functions
>and what's their name. Are they available in php3?
>
>Thanks a lot,
>Joe
>
>-Ursprungliche Nachricht-
>Von: Aaron Tuller [mailto:[EMAIL PROTECTED]]
>Gesendet: Montag, 12. Marz 2001 23:26
>An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Betreff: Re: [PHP] Cache Database-driven site
>
>
>At 11:19 PM +0100 3/12/01, Joachim Maier wrote:
>>To create the HTML-cache page i need to build the whole HTML-page content
>in
>>memory, instead of echoing it back to the user's browser, and finally write
>>it to disk. That means, i have to write all HTML in php-code. I can't just
>>embed php-parts in html tags.
>
>that's not true.  see the output buffering functions.
>
>-aaron
>
>--
>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]


-- 
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]




Re: AW: [PHP] Cache Database-driven site

2001-03-12 Thread Andrew Hill

http://www.php.net/manual/en/ref.outcontrol.php

Regards,
Andrew


On 3/12/01 6:40 PM, "Joe Maier" <[EMAIL PROTECTED]> wrote:

> Aaron,
> i would love to believe what you say.
> But i couldn't find any buffering functions in the online docs.
> 
> Could you please gimme a pointer on where i can find these functions
> and what's their name. Are they available in php3?
> 
> Thanks a lot,
> Joe
> 
> -Ursprungliche Nachricht-
> Von: Aaron Tuller [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 12. Marz 2001 23:26
> An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Betreff: Re: [PHP] Cache Database-driven site
> 
> 
> At 11:19 PM +0100 3/12/01, Joachim Maier wrote:
>> To create the HTML-cache page i need to build the whole HTML-page content
> in
>> memory, instead of echoing it back to the user's browser, and finally write
>> it to disk. That means, i have to write all HTML in php-code. I can't just
>> embed php-parts in html tags.
> 
> that's not true.  see the output buffering functions.
> 
> -aaron
> 
> --
> 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]
> 


-- 
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]




AW: [PHP] Cache Database-driven site

2001-03-12 Thread Joe Maier

Aaron,
i would love to believe what you say.
But i couldn't find any buffering functions in the online docs.

Could you please gimme a pointer on where i can find these functions
and what's their name. Are they available in php3?

Thanks a lot,
Joe

-Ursprungliche Nachricht-
Von: Aaron Tuller [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 12. Marz 2001 23:26
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: Re: [PHP] Cache Database-driven site


At 11:19 PM +0100 3/12/01, Joachim Maier wrote:
>To create the HTML-cache page i need to build the whole HTML-page content
in
>memory, instead of echoing it back to the user's browser, and finally write
>it to disk. That means, i have to write all HTML in php-code. I can't just
>embed php-parts in html tags.

that's not true.  see the output buffering functions.

-aaron

--
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]


-- 
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]