News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Matthew Turland's Blog:
Benchmarking PHP HTTP Clients
November 24, 2008 @ 07:56:30

Matthew Turland has this new blog post looking at some benchmarks he's generated for a group of mainstream PHP HTTP clients:

One of the interesting bits of research that I've done is benchmarking various mainstream PHP HTTP clients. Of course, we all know that there are lies, damned lies, statistics, and benchmarks, so take these with a grain of salt.

He ran them on his Sony Viao on Ubuntu with a stock PHP5 package. The tested packages were the pecl_http extension, the streams http wrapper, curl integration into PHP 5, PEAR::HTTP Client class and the Zend_Http_Client component. He includes the code he used for both a basic request and for something slightly more complex (posting form data). He used the XDebug and KCachegrind combination to produce the results.

0 comments voice your opinion now!
benchmark http client pecl pear zendframework streams curl



Developer.com:
Sending Email with PHP
November 05, 2008 @ 07:58:47

On the Developer.com website today, Jason Gilmore has a new tutorial covering a important feature of any based PHP install (unless disabled, of course) that is widely taken advantage of - sending emails.

Email plays a crucial role in website development, whether you'd like to confirm a new registrant's email address, recover a lost password, or provide prospective clients with a convenient means to contact you. [...] In this tutorial, I'll introduce you to several solutions for sending email using PHP, including PHP's native mail() function, PEAR's Mail package, and the Zend Framework.

He starts with some of the fundamentals of mail - the difference between POP3 and SMTP, Sendmail, etc - before moving on to an example of the mail function's usage. He does the same with the PEAR Mail package and the Zend_Mail component of the Zend Framework.

1 comment voice your opinion now!
send email mail pear zendmail zendframework tutorial


Sameer's Blog:
Simple Pagination in PHP tutorial
October 30, 2008 @ 10:29:02

Sameer has posted a new tutorial to his blog recently, a look at a drop-in solution for pagination in your application - the PEAR Pager package.

Pagination is a frequent requirement in web development projects. Most PHP developers must have already implemented paging in one form or other in their projects. In this post we will see how to add pagination the easy way using PEAR's Pager class. Note that in all the posts I use PHP 5.x.x, so if you are still stuck at version 4.x.x, its already time to upgrade.

He includes a simple example (just the page links), how to install the Pager package and a larger example where the results are pulled from a database table and paginated correctly based on an offset ID. There's even some CSS thrown in to make it a bit more pleasing to the eye.

0 comments voice your opinion now!
pagination pear package pager install tutorial css


Christian Weiske's Blog:
PEARhd steaming on
October 16, 2008 @ 08:49:02

Christian Weiske set out on a project - no small thing - to convert the current PEAR documentation info over to the PhD DocBook rendering system. In a new post he talks about the conversion process and some of the technology involved.

The reason for PhD to exist was that the previously used DSSSL based system was slow: a full build (all formats and all languages) took 24 hours to complete. Further, the tools the system based on were old, rusty and nobody understood why they broke on some machines, but also why they worked on other ones. Having a php-based system for PHP ensures that there is always someone around who can fix it if it's broken. This wasn't the case with the old documentation build system.

The conversion was spurred on by the fact that the PEAR documentation stopped building and more and more people were finding it hard to build on their machines too. He walks through the steps he took - installing PhD, converting over the docs to the DocBook 5 format and the first builds with the new system.

Now that at the XML was shiny, too, it was time to actually use PhD on it. The numbers were amazing: While a build for one format and one language took around 40 minutes on my system (dual core Macbook with 2GHz and 2GiB RAM), building the same with PhD takes 45 seconds!
0 comments voice your opinion now!
pear documentation docbook phd render xml xsl


ProDevTips.com:
Trackbacks with Google Blog Search and Zend Feed
September 15, 2008 @ 10:21:53

Wanting to automate the trackbacking process for articles linked to on the site, the ProDevTips blog went with a simple method using the Google Blog Search and Zend_Feed to parse the resulting feed from the search.

So Google Blog Search it is then. When you use the search you have the option of subscribing to it through an RSS feed. I did a link:url search and just copied the resultant feed URL. Using this URL it is possible to fetch for instance 10 results and display them through parsing the atom feed.

The example script queries the Google search, requests an output format of atom and spits back out a listing of the other sites/blog posts that link to any given article.

0 comments voice your opinion now!
trackback google blog search zendfeed tutorial


Devollo.com:
Data Filtering Using PHP's Filter Functions - Part one
September 15, 2008 @ 09:33:33

On Devollo.com the first part of a series looking at something every PHP developer (or any other for that matter) should include in their application - data filtering.

Filtering data. We all have to do it. Most, if not all of us, despise doing it. However, unbeknown to most are PHP's filter_* functions, that allow us to do all sorts of filtering and validation. Using PHP's filter_* functions, we can validate and sanitize data types, URLs, e-mail addresses, IP addresses, strip bad characters, and more, all with relative ease. This is part one of two, covering filter_var() and the different constants and flags that can be set.

This method, using the filter extension, takes a lot of the work out of making sure that user-submitted data is what it should be. They include examples of how to filter numeric types, URLs, email addresses and how to sanitize the data to be sure there's no cross-site scripting or SQL injections to be found. This is a great reference if you're looking to get started with the filter extension.

0 comments voice your opinion now!
data filter extension pear tutorial example


DevShed:
PHP Networking
September 09, 2008 @ 12:09:12

In a new tutorial from DevShed today, they take a look at some of the "networking" functions that PHP has to offer - basically anything that can make a network connection.

PHP has a great many tools for interacting with a network and also with the Internet. In this article we will look at some of those tools and functions to see how we can use them to make our scripts more useful in a network environment.

They look at the fopen, gethostbyname, gethostbynamel, getservbyport and the Net_Whois PEAR package (among others).

0 comments voice your opinion now!
tutorial network socket dns netwhois pear


Helgi's Blog:
PEAR installer updating its PHP deps
August 12, 2008 @ 12:04:26

Helgi has posted about an update to the next alpha release of PEAR to remove support for certain versions of PHP:

For the next alpha release of PEAR that will happen in 2 - 4 weeks we'll have a min dep of PHP 4.4 and 5.1.6, so basically excluding 5.0.0 - 5.1.5 Now why am I going to do that?

This pushes more people up from the PHP 4.3.x series (to the 4.4.x that was the last PHP4 release) and up to a more recent PHP5 version for the future. Eventually, PHP4 support will be dropped all together, but for now there's a bit of a hold out.

0 comments voice your opinion now!
pear installer dependencies php4 php5 support version


Dhiraj Patra's Blog:
Caching PHP Programs with PEAR
August 07, 2008 @ 12:58:09

In a recent post to his blog Dhiraj Patra looks at the caching functionality that PEAR has to offer via the PEAR Cache package.

Caching is currently a hot topic in the PHP world. Because PHP produces dynamic web pages, scripts must be run and results must be calculated each time a web page is requested, regardless if the results are the same each time. In addition, PHP compiles the script every time it is requested. [...] PEAR's Cache package offers a framework for the caching of dynamic content, database queries, and PHP function calls.

He talks a bit about what kind of methods are included with the package and shows examples of how it works for function call caching, caching the output from the script execution and how to implement your own custom caching extension of the main code to make it even more flexible.

3 comments voice your opinion now!
pear cache tutorial function call output custom handler


Jacques Marneweck's Blog:
Grab PEAR via CVS is you need it
August 04, 2008 @ 09:34:40

Jacques Marneweck has a quick reminder for those trying to get the latest PEAR installer - you can always get it from CVS.

Quick note that the PEAR installer is missing (go-pear.org has expired and has been snapped up by some cybersquatters) and http://pear.php.net/go-pear renders a 404. So the current solution is to grab the go-pear install from CVS.

A quick curl call to a url on the cvs.php.net site (in the /pearweb directory) is all it takes to grab the latest. The page it's pulling is the source for the go-pear.php installer that can be run either from a web browser or from the command line (with a PHP binary).

0 comments voice your opinion now!
pear cvs gopear installer curl pearweb



Community Events







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


release zendframework application mysql releases book zend package ajax security PHP5 example framework cakephp code job conference PEAR developer database

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