 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Perplexed Labs Blog: PHP Forking to Concurrency with pcntl_fork()
by Chris Cornutt March 10, 2010 @ 13:05:59
On the Perplexed Labs blog there's a recent post looking at how to fork processes in PHP with the help of the pcntl_fork function and the process management extension.
Let's say you want to take advantage of more than one core for a given process. Perhaps it performs many intensive computations and on a single core would take an hour to run. Since a PHP process is single threaded you won't optimally take advantage of the available multi-core resources you may have. Fortunately, via the Process Control (PCNTL) extension, PHP provides a way to fork new child processes.
He gives a quick snippet of code showing how to spawn off a few new processes, get their process IDs and watches a max number of children until one dies (then starts another).
voice your opinion now!
process control extension tutorial concurrency pcntlfork
Michael Maclean's Blog: Handling fonts in PECL/Cairo
by Chris Cornutt March 02, 2010 @ 12:42:43
Michael Maclean has a look at working with fonts in Cairo (a graphics manipulation extension in the PECL repository). The example will be added to the PHP manual too in case you need it for reference later.
Currently, in PECL/Cairo the only way to draw text is the referred to as the "toy" text API, which is a very basic way of handling text compared to the facilities available in the Cairo library itself. However, it's sufficient for most purposes that I've come across so far.
With the first versions of the Cairo extension, you had to use the selectFontFace method to choose the font you wanted. With the introduction of Cairo 0.2.0, you can now use FreeType font support instead and can use the streams API built into PHP to locate the resource. A snippet of code is included to show how that would work.
voice your opinion now!
cairo graphic manipulation extension font freetype
Alex Netkachov's Blog: CMS extensions where to find, how to choose?
by Chris Cornutt February 26, 2010 @ 11:47:15
Alex Netkachov has a new post for those using one of the popular content management systems out there and who might be looking for some resources to find some good extensions for them.
No matter how long you keep a web site, if you update it frequently, holding a community, or taking care of it in any other way, at any moment idea of changing or improve its functionality may come to your mind. If you are not a software developer then you have two options: find the developer that will do it for you or try to find extension for the CMS of your site that changes it in the way you want.
He offers a few tips on finding the right extension for your site and needs like looking out for extensions that aren't really extensions and checking the release date to make sure it's current. He also includes a few links to some of the larger CMS extension sites for Drupal, WordPress, Blogger, Joomla and DotNetNuke.
voice your opinion now!
cms extension find tips
Ryan Mauger's Blog: Keeping your html valid with Zend Framework, Tidy and Firebug
by Chris Cornutt January 29, 2010 @ 13:54:38
Ryan Mauger has a new post today looking at how to combine the Tidy extension for PHP and Firebug with a Zend Framework application to keep your HTML neat and valid with a handy bit of feedback for debugging.
With Zend Framework there is an easy way to ensure that you always create valid HTML in your applications. This involves the use of a simple Front Controller Plugin, and the php Tidy component. [...] So you can use tidy for filtering user input, what about using it to effectivly clean my documents and ensure my output is always valid?
He starts off with the pieces of the puzzle you'll need - the front controller plugin for the Zend Framework application, using the Tidy extension to filter your HTML and combining the two to make a dispatchShutdown() call to make the transformations. Firebug comes in to help with logging the issues Tidy found so you can correct them.
voice your opinion now!
zendframework tidy extension firebug tutorial
Dennis Docter's Site: Zend Debugger Toolbar Extension for Chrome
by Chris Cornutt January 19, 2010 @ 14:37:14
Dennis sent in a submission about a toolbar he's created to work with the Zend Debugger (in an extension) for the Chrome Browser:
Since i have not yet seen an official extension for chrome (or i have not looked hard enough), i created one so i don't have to switch back to Firefox all the time, while I wait for the official extension. It only has the basic functionality (debug, debug next, profile and some configuration options) and it probably has some bugs and quirks, but it functions fine for me.
You can download this toolbar from here and if you have issues installing it, you might check out this post on the Zend Forums.
voice your opinion now!
zend debugger extension toolbar chrome
NETTUTS.com: Techniques for Mastering cURL
by Chris Cornutt January 11, 2010 @ 09:30:08
In a recent tutorial from NETTUTS.com Burak Guzel shows you how to get the most out of using the curl extension with PHP to handle things like remote requests, file uploads and handling multiple curl requests at the same time.
cURL is a tool for transferring files and data with URL syntax, supporting many protocols including HTTP, FTP, TELNET and more. Initially, cURL was designed to be a command line tool. Lucky for us, the cURL library is also supported by PHP. In this article, we will look at some of the advanced features of cURL, and how we can use them in our PHP scripts.
He starts off with the basics, making a request and getting some information about the connection, before moving on to some more complex features - detecting redirection, POSTing values to a remote site and the creation of a WordPress link checker.
voice your opinion now!
curl tutorial extension
|
Community Events
Don't see your event here? Let us know!
|