NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Simple gz compression

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-24-2005, 08:38 AM THREAD STARTER               #1 (permalink)
Account Closed
 
GeorgeB's Avatar
Join Date: May 2005
Posts: 648
GeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really nice
 



Simple gz compression


Want to use gz compression on your PHP pages to compress pages and save bandwidth without affecting performance?

Use the PHP ob_gzhandler callback function.

Here is an example of it's use:

Code:
<?php

ob_start("ob_gzhandler");

?>
<html>
<body>
<p>This should be a compressed page.</p>
</html>
<body>
That's right... a simple line at the beginning of your PHP file is all it takes! Try it yourself in your own custom, paid, or free PHP applications
????: NamePros.com http://www.namepros.com/code/101433-simple-gz-compression.html

Note: ob_gzhandler() requires the zlib extension.

More FREE helpful tutorials like this one at www.georgeboone.com
Last edited by GeorgeB; 10-27-2005 at 01:53 PM.
GeorgeB is offline  
Old 06-24-2005, 11:27 AM   #2 (permalink)
Senior Member
 
Porte's Avatar
Join Date: May 2005
Location: I'm right here
Posts: 3,526
Porte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud of
 



Hey George, I use currently at my custom script one page only index.php which calls all other pages as includes depending on the 'mode' value. Do I input this line in the index page only? or the includes as well? ~

And it needs to become at the very top right below session_start(); ?
Porte is offline  
Old 06-29-2005, 02:26 AM   #3 (permalink)
NamePros Member
Join Date: Oct 2003
Posts: 126
i386 is an unknown quantity at this point
 



Cool, didn't know that one! Thanks for sharing!
i386 is offline  
Old 07-01-2005, 11:56 AM   #4 (permalink)
Account Closed
Join Date: May 2005
Location: NY, USA
Posts: 283
hasif has a spectacular aura abouthasif has a spectacular aura about
 



oh! i hope i can use it any of my forum.
hasif is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Simple site management with the use of PHP and the query string(?page=1) deadserious Webmaster Tutorials 8 10-09-2004 02:20 PM
Tutorial: Creating a simple cgi hit counter for your site using Perl deadserious Webmaster Tutorials 3 05-29-2004 02:31 AM
A simple cgi hit counter for your site using Perl deadserious CODE 2 11-07-2003 09:23 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:43 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger