News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Brandon Savage:
Consuming RabbitMQ messages with PHP
May 31, 2013 @ 09:15:47

Brandon Savage continues his look at using RabbitMQ and PHP together to queue up requests today in this latest post. In this new part of the series, he focuses on the last piece of the puzzle - consuming the requests in the queue. (Parts one and two)

Once you've created a RabbitMQ producer, it's fairly easy to create a consumer. In fact, the only difference is in exactly what commands you're using. The connection, envelope, channel and queue declarations are the same. While in RabbitMQ you publish to the exchange, you actually do consume a specific queue. As a result, the commands for consuming are part of the AMQPQueue class.

He shows you how to set up the code to sit in the background and wait for a queue request and how to fetch them in a non-blocking way. He finishes off the post with a look at handling success and error conditions (based on the status of message consumption, not the result of the processing).

0 comments voice your opinion now!
rabbitmq tutorial consume amqp library success failure nonblocking background

Link: http://www.brandonsavage.net/consuming-rabbitmq-messages-with-php

Wan Qi Chen:
Background jobs with php and resque (Series)
October 10, 2012 @ 10:13:11

Wan Qi Chen has started a new series that looks at using PHP port of the resque (a Ruby based tool) to do background processing for parts of his PHP applications - PHP-Resque. So far, there's three parts to the series (with one more on the way):

  • Part one introduces the idea behind working with a background queue, the general workflow a process would follow and some of the benefits/drawbacks of using them.
  • In part two he gets more into the actual queue system and discusses the concept of a "job".
  • The third part gets more into the implementation and helps you get the PHP-Resque, predis extension and the process control extension installed.

The fourth part of the series (pending) will get into the actual code to implement this system you've job installed.

0 comments voice your opinion now!
background queue phpresque tutorial series


PHPClasses.org Blog:
Throttling Background Tasks Unusual Site Speedup Techniques Part 2
October 26, 2010 @ 09:17:55

On the PHPClasses.org blog Manuel Lemos has posted part two of his look at techniques to help speed up your site - a few things that you maybe hadn't thought of before.

In the previous article I talked about one important factor that often seriously affects the user perception of the speed of a site, which is the presence of content from external sites that slows down the load of pages, such as advertising and widgets. In that article I presented a technique that I am using to make external content not affect the user perception of the site speed. In this article I am addressing another factor that may also affect the user perception of site speed, but this time is related to aspects of the server side environment.

In this article he looks at things like other server-side background processes, throttling their CPU usage, throttling PHP's CPU usage and the use of a monitoring class to help you and your applications (and sysadmins) stay on top of what's happening with the server.

11 comments voice your opinion now!
background task throttle site speed tutorial


Steponas Kazakevicius' Blog:
Interruptable file download
September 13, 2010 @ 10:06:32

Steponas Kazakevicius has written up a new tutorial about file downloading and, more specifically, making an download tool that can handle interruptions in mid-stream (elegantly).

Have you ever been to a website that offers downloads of stuff? And while you are waiting for the download, there are lots of ads around? Sure you have. I have too. The last day I was downloading stuff. An idea came to my head. Was there a site which required to stay and watch the ads while you are downloading? Didn't see one. Is that technically possible? Sure. I wanted to show how. So I made a small web app for that.

His application (live demo or download available) submits the user upload in the background so that, if the user decides to cancel it, they can at any time and move on immediately.

4 comments voice your opinion now!
tutorial interrupt download background


Ralph Schinlder's Blog:
PHPundamentals Series A Background on Statics (Part 1 on Statics)
May 07, 2010 @ 09:47:59

Ralph Schindler has started up a new series of posts to his blog with this first article looking one of the fundamentals of PHP - statics.

Static class members (from here on called simply, 'œstatics') in PHP conjure both the best and worst in developers for a variety of reasons. In part 1 of this series of articles on statics, we'll explore some background to get a better understanding of statics in PHP.

He covers some of the places that the idea of "static" came from and how its used in a few other languages (including ones PHP borrowed some of its ideas from). He uses a few analogies to illustrate what statics are and even includes some illustrations of how the static scope of PHP compares with other languages (like Java and .NET).

0 comments voice your opinion now!
fundamental static language background


Andre Liem's Blog:
5 tips and tools to optimize your php application - Part 1 simple
December 02, 2008 @ 15:31:07

Andre Liem has posted five simple tips (part one of a two-part series) on ways to optimize your PHP applications.

After experiencing some issues with an application running the Zend Framework, I realized there were a lot of things I was not doing to optimize my application. There are simple and more complex actions you can take to speed up your application. Since time is precious, and developers with an expertise on optimization are not always available, I've split this post into two sections (simple and more advanced). This post focuses on the simple part.

His simpler suggestions include using the YSlow extension in Firefox, minification of Javascript and CSS, merging CSS/JS requests, using gzip and avoiding CSS background images.

0 comments voice your opinion now!
optimize application tip tool yslow javascript css marge background


Developer Tutorials Blog:
Running background processes in PHP
July 18, 2008 @ 11:18:21

New on the Developer Tutorials blog today is this look at handling background processes from your PHP script:

You've checked and double checked the integrity of user input, and you're doing some serious processing. There's only one problem: it's too slow. There's a simple solution: forking your processing script, and running the code as a background process asynchronously. It can email your user when it's done: they'll wait. In this tutorial, I'll show you how to get started with background processes in PHP.

Akash gives examples of the three keys to background processes - starting the script via an exec, talking to the process by passing additional parameters and including code to monitor the state of the background process via something like a MySQL "sessions" table that the script writes to.

0 comments voice your opinion now!
process background exec parameter mysql session track


Zend Developer Zone:
Decorators with Zend_Form
May 05, 2008 @ 12:57:34

On the Zend Developer Zone there's a new tutorial (by Matthew Weier O'Phinney) covering the use of decorators with the Zend_Form component of the Zend Framework.

One point of flexibility [Zend_Form] offers has proved to be a pain point for many developers: decorators. This tutorial aims to shed some light on decorators, as well as provide strategies for creating your own decorators and combining them in creative ways to customize the output your forms generate.

Matthew starts with a little background behind the component to help you find your way around. Building on this, he shows how to use some standard output decorators and how to create decorators of your own. His example shows how to create a set of grouped checkboxes.

1 comment voice your opinion now!
decortor zendform tutorial background example


Mikko Koppanen's Blog:
Fill patterns
April 29, 2008 @ 15:24:50

Mikko Koppanen has a quick post today showing how to use PHP and Imagick to create an image of text filled with another image layer behind it:

The fill pattern is used to annotate text but the named pattern could also be used to fill any shapes that allow fill to be specified (include circles, ellipses, rectangles, polygons etc etc).

His example is pretty simple (with a "Hello World!" output) that pulls in the background image, creates the composite layer over it, adds the text to it and sets the fill to the background image's layer. The whole this is wrapped up and output as a PNG file.

0 comments voice your opinion now!
fill pattern imagick tutorial example png background image


Mikko Koppanen's Blog:
Trimming an image
November 02, 2007 @ 12:58:00

Mikko Koppanen shows how, in his latest blog post, to take an image and trim it down with Imagick to get rid of extra surrounding background information.

Especially product images usually "suffer" from this issue; the product itself is composited on a white background and there are large areas of white around the object.

This is a simple example to demonstrate how to easily trim the areas off the image and only display the parts where the object lies.

His example code, a quick 16 line affair, takes in the test image, looks for a RGB value given and uses the built-in trimImage function to reduce its size.

0 comments voice your opinion now!
trim image extra background imagick example trim image extra background imagick example



Community Events











Don't see your event here?
Let us know!


application component framework series language facebook install hack symfony2 unittest introduction podcast opinion code composer overview security release package hhvm

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework