atticus Posted February 15, 2008 Share Posted February 15, 2008 Hi all, I am using shared hosting and I do not have access to the server and I am trying to use php to gzip my components. I know my server is ablt to gzip because I have a version of zen-cart installed on it and it gzips the components. Its just not working. <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?> Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted February 15, 2008 Share Posted February 15, 2008 I believe the ob_gzhandler() callback function takes care of checking whether the user agent is capable of handling gzipped content. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 15, 2008 Share Posted February 15, 2008 I use this function all the time to send contents compressed, hope it works for you too: update: my posts aren't going through properly Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 15, 2008 Share Posted February 15, 2008 It won't let me post the code for some reason...so here it is in an attachment Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.