Output buffering / Gzip !?!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RedDragon
Forum Newbie
Posts: 7
Joined: Wed Feb 19, 2003 3:16 pm
Contact:

Output buffering / Gzip !?!

Post by RedDragon »

Welli read some page about Gzip and output buffering and tried to integrate gzip into my code

if its not using gzip its just compressing it without gzip...
my questions:
1) Will this code do the job (compress the output) ?
2) Why does ob_end_clean or ob_clean doesnt work when html output is finished (result is a white page), can i use end_flush instead ?
3) Does anyone know about the browser_supports_gzip function as i wasnt able to find anything about it

Code: Select all

/*header.php*/
if($settings['gzip'] == "on" && @browser_supports_gzip && @function_exists('ob_gzhandler')) {
	ob_start('ob_gzhandler');
} else {
	ob_start();
}

//html between

/*footer.php*/
ob_end_flush();
thx for ur help
RedDragon
Forum Newbie
Posts: 7
Joined: Wed Feb 19, 2003 3:16 pm
Contact:

Post by RedDragon »

anyone???
Post Reply