The Zend Developer Zone has posted this new tutorial from Vikram Vaswani covering the use of different archive formats (like RAR, LZF and BZ2 compression methods) from inside PHP.
When it comes to dealing with different file formats, it's hard to faze PHP. XML documents, PDF files, JPEG images, MP3 media...you name it and, chances are, there's a PHP extension to handle it. And so it is with compression formats like RAR, LZF and Bzip2 - although these archive formats are far less common today than the ubiquitous TAR and ZIP formats, they are still actively used by many applications and projects, and continue to be supported in PHP via PECL extensions.
He pulls in a few PECL extensions to give PHP the power it needs, both for unix-based systems and Windows DLL files. He includes some sample code showing how to open up a rar file and list the contents inside as well as extract the files themselves. And, of course, code examples for compressing files into a new archive is included too.
From PHPClasses.org today, there's a new article describing the combination of a few technologies - more specifically Ajax, Comet, and PHP - to create responsive applications.
This post describes an approach used to implement highly responsive AJAX applications using the COMET approach. It describes in detail how the AJAX COMET approach can be implemented in PHP.
It also discusses how HTTP compression and chunking affect AJAX response delays, as well aspects that may influence the choice between Apache 1.3.x with mod_gzip versus Apache 2.x with mod_deflate for AJAX COMET applications.
For each topic, there's a bit of explaination and some links to reinforce the ideas. There's not really any code, but he does link to various classes that can help combine to meet the goal.
The International PHP Magazine has posted the results of the question asked in their latest poll - "What is the Top Criterion for Scaling PHP?"
Of the six options they provided:
Object code caching
Template systems
Distributed object-caching systems
PHP variables that can be set
Output Compression
Other things that may help
one stood out as a clear winner - "Object code caching". Bringing up second place was "Distributed object-caching systems" and the other options coming in pretty close behind.
Be sure to cast your vote for their latest poll question - "Which is the Most Common Database Problem?"
The International PHP Magazine has posted the results of their latest poll today, asking the question "what's the best way to speed up your site?"
Options included:
Reduce overall latency by reducing HTTP requests
Save your images properly
Strip extraneous PHP calls
With the option of "Miscellaneous thoughts" coming in at the number one place. The next step down was a tie between "Save your images properly" and "Reduce overall latency by reducing HTTP requests" with "Compression" following close behind.
Be sure to cast your vote in this week's poll asking "What is the Top Criterion for Scaling PHP?"
Paul Stamatiou shares with us today five ways to speed up your site, some quick and easy recommendations to making your site fly.
Throughout the blogosphere I'm always seeing these blogs, that while they look great, are horribly slow and overburdened. Over the past few months I have become somewhat of a website optimization specialist, bringing my own site from an over 250kB homepage to its current 34kB.
I will help you achieve some of the same success with a few, powerful tips. Most of these are common sense, but I can't stress their importance enough. I will concentrate on the website and not the server in this article, as there are too many things to discuss when it comes to server optimization.
The five tips mentioned include "Reduce Overall Latency by Reducing HTTP Requests" and "Compression", each with a paragraph or so of explaination as to what it is and how to implement it. There's even a PHP-specific one that talks about a paring down of the bits of functionality that really aren't needed.
DevShed has posted part two of their series on speeding up your page load times with HTTP compression, this time looking at a more object-oriented approach to handling the data you want to compress.
Over the first tutorial of this series, I developed some hands-on examples, aimed at illustrating how "Gzip" encoding can be used within PHP scripts to compress the output generated by dynamic PHP pages. After transferring the encoded data to the client, contents are uncompressed and finally displayed on the browser.
By the end of this article, you should have the appropriate knowledge for building a simple data compressor class, in addition to using HTTP compression for reducing the download time of object-generated web pages.
They start with the creation of a simple data compression class, with functions to see if the browser supports gzip encoding and to get/send/compress the actual data. With the sample class created, they put it to the test with a more real-world example - echoing out user information from a MySQL database.
One of the holy grails of web development is to have your pages lost the fastest way possible. People spend hours optimizing images and condensing the amount of data they actually send over the wire to reach this goal. There are, however, other ways to achieve some of the same results, HTTP compression being one of them. For those that aren't familiar with the topic, DevShed has this new article to bright you up to speed.
This article, the first of three parts, shows you how to make PHP pages load faster by showing you how to compress dynamic PHP pages. Techniques covered include using PHP's built-in "gzencode()" function, along with output buffering control functions.
Since PHP offers a powerful built-in library for handling HTTP compressed data, over this series I'll explain the basics of working with HTTP-compressed PHP pages. I'll illustrate, with several code samples, different methods for compressing dynamic PHP pages.
They start with the basics, writing up a simple script to compress the output from a simple PHP file, one that displays records from a "users" database. With that foundation laid, they move on to the heavy stuff - using more than just simple output buffering to speed up those pages. Their new example makes use of the gzip functions in PHP to compress the data even further. A gzip header is passed off to the browser and it pulls it all neatly compressed over to open on the client-side.
On the "When Penguins Attack" blog today, there's a brief guide to help you tune your IIS installation for PHP.
IIS is a multi-threaded web server available on Windows NT and 2000. From the Internet Services Manager, it is possible to tune the following parameters: Performance Tuning based on the number of hits per day, Bandwidth throttling, Process throttling, Timeout, and HTTP Compression.
He looks at tips for each of the above, as well as other things like the memory cache size and max pool threads that can be changed with the help of the registry editor...