Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Wide Finder in...errr...PHP
Nov 01, 2007 @ 13:24:00

In a new post on the SitePoint PHP blog today, Harry Fuecks has created a "wide finder" based on a project put together by Tim Bray.

Tim set a simple, but very much real-world challenge; write an app that determines the top 10 most popular blogs from his Apache access log. It should be fast and readable, with a subtext of illustrating how "language X" copes in terms of parallel processing and utilizing "wider" (many processor) systems.

Since PHP natively doesn't support multi-threading (well), Harry opted to go with an approach using curl_multi_exec instead. There's two pieces to the puzzle - the mapper to grab the information and extract the data and the reducer that makes the calls to grab the information from the log files.

tagged: wide finder timbray apache log popular reducer mapper wide finder timbray apache log popular reducer mapper

Link:

SitePoint PHP Blog:
Wide Finder in...errr...PHP
Nov 01, 2007 @ 13:24:00

In a new post on the SitePoint PHP blog today, Harry Fuecks has created a "wide finder" based on a project put together by Tim Bray.

Tim set a simple, but very much real-world challenge; write an app that determines the top 10 most popular blogs from his Apache access log. It should be fast and readable, with a subtext of illustrating how "language X" copes in terms of parallel processing and utilizing "wider" (many processor) systems.

Since PHP natively doesn't support multi-threading (well), Harry opted to go with an approach using curl_multi_exec instead. There's two pieces to the puzzle - the mapper to grab the information and extract the data and the reducer that makes the calls to grab the information from the log files.

tagged: wide finder timbray apache log popular reducer mapper wide finder timbray apache log popular reducer mapper

Link:

Zend Developer Zone:
Compressing JPEG images with JPEG Reducer
Dec 29, 2006 @ 16:19:00

On the Zend Developer Zone, Manuel Lemos has posted a brief look at one of the classes over on the PHPClasses.org website - JPEG Reducer.

If you want to generate JPEG images with a limited file size, and at the same time you do not want to sacrifice too much the image quality, you have to find an approximated value for the quality factor that leads to an image with a file size near the desired limit.

The JPEG Reducer takes this approach, providing you with the ability to give it the quality you want and have it approximate the closest values to convert it to. There's a brief code example included as well. Check out the full documentation for the class here.

tagged: class phpclasses compress jpeg reducer class phpclasses compress jpeg reducer

Link:

Zend Developer Zone:
Compressing JPEG images with JPEG Reducer
Dec 29, 2006 @ 16:19:00

On the Zend Developer Zone, Manuel Lemos has posted a brief look at one of the classes over on the PHPClasses.org website - JPEG Reducer.

If you want to generate JPEG images with a limited file size, and at the same time you do not want to sacrifice too much the image quality, you have to find an approximated value for the quality factor that leads to an image with a file size near the desired limit.

The JPEG Reducer takes this approach, providing you with the ability to give it the quality you want and have it approximate the closest values to convert it to. There's a brief code example included as well. Check out the full documentation for the class here.

tagged: class phpclasses compress jpeg reducer class phpclasses compress jpeg reducer

Link:


Trending Topics: