| | |||||
| ||||||||
| 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. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Account Closed Join Date: May 2005
Posts: 648
![]() ![]() ![]() ![]() | 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> ![]() ????: 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.
|
| |
| | #2 (permalink) |
| Senior Member Join Date: May 2005 Location: I'm right here
Posts: 3,526
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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(); ? |
| |
![]() |
| 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 |