News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

Maarten Balliauw's Blog:
PHPPowerPoint 0.1.0 (CTP1) released!
April 30, 2009 @ 11:16:53

Maarten Balliauw has posted about the release of a new bit of software to help you read and write from/to Microsoft PowerPoint files - PHPPowerPoint (0.1.0 CTP1).

Just like with PHPExcel, PHPPowerPoint can be used to generate PPTX files from a PHP application. This can be done by creating an in-memory presentation that consists of slides and different shapes, which can then be written to disk using a writer (of which there's currently only one for PowerPoint 2007).

Some example code is included that creates a single-slide slideshow with the PHPPowerpoint logo and the text "Thank you for using PHPPowerpoint". There's plenty of configuration options and you can place things in the slides down to the pixel. You can try out this initial release here.

0 comments voice your opinion now!
phppowerpoint release powerpoint slide microsoft read write



Paul Gregg's Blog:
"tail -# file" in PHP
April 24, 2009 @ 12:02:42

Paul Gregg has written up an example of what he calls "tail -# file for PHP" (starting from the end of file and moving backwards a given number of lines).

Here I will demonstrate a fairly tuned method of seeking to the end of the file and stepping back to read sufficient lines to the end of the file. If insufficient lines are returned, it incrementally looks back further in the file until it either can look no further, or sufficient lines are returned.

His script meets two goals - reading enough lines in for the request and keeping those lines to a minimum. His code grabs the size of the file and opens the file as a resource to fseek to a certain point and read in the lines from the defined start to finish and push them into an array. You can see the source here and a sample execution here.

0 comments voice your opinion now!
tail log file fseek example read


PHPro.org:
Read Line From File (stream_get_line)
April 23, 2009 @ 09:36:51

The PHPro.org website has a quick new tutorial about a method (using streams) to get the information from a certain line of a file.

Reading files in PHP can be a tricky business if not handled correctly. Most often when confronted with reading a line from, the nearest tool to hand is the file() function. The problem with using the file() function is that it reads the whole file into an array, and thus, into memory [...] A better, and more efficient way is to loop through the file stream using the stream_get_line() function. Care still needs to be taken to clear the buffer on each iteration, or the same problem could potentially arise as with the file() method.

The code calls fopen on the file and, while it's not the end of the file, uses the stream_get_line function to grab things a line at a time. This saves you from having to read in the entire file (like with a file_get_contents or file - especially good for large files.

0 comments voice your opinion now!
stream tutorial file line read streamgetline


TotalPHP.com:
How to Read an RSS Feed with PHP 5
April 22, 2009 @ 11:15:16

New on the TotalPHP blog today is this article talking about reading RSS feeds with PHP (more specifically with SimpleXML).

PHP 5's ability to read XML files is fantastically easy to use. In the past it was possible but it required quite a bit of long winded code to get any where. PHP 5's SimpleXmlElement function makes working with XML a breeze, and with much less code too!

They include a script as an example - five lines to completely parse and pull the title and link information out of the remote RSS file. The example creates a SimpleXML object using the feed's URL and makes each element inside accessible as an object (that can be looped through and properties can be checked on).

0 comments voice your opinion now!
title link object example simplexml php5 read rss


Zend Developer Zone:
Reading Access Databases with PHP and PECL
November 26, 2008 @ 13:26:12

The Zend Developer Zone has a new tutorial posted today from Vikram Vaswani about accessing a database with the help of the MDBTools PECL extension to read from a Microsoft Access datbase.

In this article, I'll introduce you to PHP's MDBTools extension, which provides an API to programmatically read data from Microsoft Access database files. If your project involves working with such files, extracting database records either for calculations or for conversion to other formats, you'll find this extension invaluable.
He steps through the installation of the extension (via the pecl command line tool) and some sample code that grabs the tables, all of their attributes and how to select the data out from them.

0 comments voice your opinion now!
read database tutorial msaccess microsoft access pecl extension mdbtools


SitePoint Web Tech Blog:
How To Create Friendlier Random Passwords
November 13, 2008 @ 07:55:59

New on the SitePoint "Web Tech" blog today is a post by Craig Anderson about friendlier passwords.

One aspect of web applications which is almost always overlooked when it comes to accessibility is how easy any randomly generated string might be to read. If you're lucky enough to have near perfect vision and have no learning or cognitive disabilities such as dyslexia, you mightn't suffer from any problems reading randomly generated strings, but for many users distinguishing between zero and upper-case Os, ones and lower-case Ls, and even the letters b and d can be difficult.

He includes a simple little PHP script that pulls letters and numbers from a pre-defined "friendly" array that can be read more easily by those with some sort of visual issue. Obviously, the results would be less secure than some other methods (only so many to go around) but its still a wide enough range for most common uses (around 17 million passwords).

0 comments voice your opinion now!
friendlier random passwords tutorial example visual read easy


NETTUTS.com:
How to Read an RSS Feed with PHP - Screencast
October 22, 2008 @ 13:04:51

The NETTUTS.com site has a new article pointing out a screecast talking about pulling in and parsing the contents of an RSS feed.

Dynamically pulling in an RSS feed was beyond the scope [of this article]. In today's video tutorial, I'll show you exactly how to do this using PHP. At roughly forty-five minutes in length, you might want to take a quick "pre-screencast bathroom break". You also might want to grab some raisins.

Due to some video issues, the screencast is current posted here (but will be in the post in the future). As always, the source code can be downloaded and a live demo is available to sample the end result.

0 comments voice your opinion now!
tutorial screencast rss read parse


Eran Galperin's Blog:
Handling mail and mime in PHP using the Zend Framework
July 18, 2008 @ 08:47:27

On the Techfounder blog (from Eran Galperin) there's a quick tutorial about using the Zend_Mail component of the Zend Framework to send both normal, plain-text emails and ones with MIME attachments.

Using PHP's built in function (aptly named mail() ) is relatively straightforward - until you need slightly more advanced features, such as adding and encoding email headers or sending multiple mails efficiently. Fortunately, the Zend Framework comes with a very capable mail component called Zend_Mail.

He shows how to send a simple email, do something a bit more complex with a custom SMTP server, read messages from a remote POP3 email box and how to attach a binary file/message.

0 comments voice your opinion now!
zendframework email zendmail mime attachment pop3 read smtp custom


Bryan's Blog:
5 (More) Ways to be a Better PHP Developer
February 14, 2008 @ 12:53:00

Following up on this article from Akash Mehta, Bryan has posted five more suggestions he has to help make you a better PHP developer.

I thought all of Akash's suggestions were good but a little broad and seemed to involve a lot of reading. And while any budding developer will jump at the chance to expand their burgeoning technical library, I thought there were a couple of items we could add to his list.

The recommendations that made his list are

  • Start a project that other people (developers and end users) will use.
  • Learn another language.
  • Teach someone PHP.
  • Ask for suggestions not solutions.
  • Use what you read.

I'm particularly a fan of the third one (teaching) - not only does it spread PHP out even more through the masses, but it can really test you on your knowledge (some of those "how do I.." questions can get a bit complex, even from beginners).

0 comments voice your opinion now!
better developer suggestion list teach suggestion read project language


Developer Tutorials Blog:
4 PHP Professional Development Paths
January 29, 2008 @ 12:04:00

Akash Mehta has posted a list of suggestions he has for developers wanting to move up and enhance their skills in the language:

So, you're an up-and-coming PHP developer, you're spending a lot of time learning new tricks and you're always on the bleeding edge when it comes to using technologies in your web applications. What's next?

His four answers to "what's next" are:

  • Read books, write code.
  • Attend conferences
  • Take courses and qualification tests
  • Watch the web

...with the final one being his most important.

1 comment voice your opinion now!
development path professional read confernce test



Community Events









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


developer apache codeigniter drupal feature version podcast opinion job zendframework facebook sqlserver extension windows release conference framework wordpress microsoft symfony

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