Archive for July 18th, 2006

DevShed: Using Method Call Overloading in PHP 4

DevShed has posted part two in the series they’ve worked up covering overloading classes inside of a PHP4 environment. In this edition (two of three) they focus on method call overloading, a step up from the previous property overloading.

This is part two of the series “Overloading classes in PHP.” In three tutorials, this series teaches how to overload your classes in PHP 4 by using the “overload()” PHP built-in function, in conjunction with the implementation of the “__set()”, “__get()” and “__call()” methods, and explores the native support of object overloading in PHP 5.

They first take a step back and go over the concepts behind the property overloading from the previous part of the series. After being reminded of that (or hearing it for the first time for some), they translate that directly into a method for use on methods. And, with the help of a __call request, they show you how to make it all work together and overload the method call.

Continue Reading · Add comment

IBM developerWorks: Understanding the Zend Framework, Part 3: The feeds

In their continuing series on the Zend Framework, the IBM developerWorks site has posted part three today, a closer look at working with feeds in the framework.

This “Understanding the Zend Framework” series chronicles the building of an online feed reader, Chomp, while explaining the major aspects of using the recently introduced open source PHP Zend Framework.

In parts 1 and 2, we discuss the goals behind the Zend Framework and show you how to use it to create the beginnings of our online feed reader, creating a form and adding information to a database while getting to know the MVC pattern. In this tutorial, you will see how to use the Zend Framework to implement the online feed reader portion of the application.

Obviously, you’ll need to have kept up with the previous articles in the series (one, two) to get a grasp on this one, but those are quick reads so you can get caught up quickly. They first build up a new schema with tables for the RSS data being pulled in, then start creating the view and controller to get the ball rolling. They also introduce the Zend_InputFilter class for testing and removing unwanted content. The code in the controller allows the creation of new feeds, the subscribe to a feed, update a users information, and authenticate the user.

The FeedController does the work of grabbing the contents of the remote feeds and parsing them down to be used locally. They also include functionality to “bookmark” entries and save them for later.

Continue Reading · Add comment

Paul Jones’ Blog: Solar-Talk Archives Now Searchable

Solar fans can now rejoice (well, more than usual) - according to this post on Paul Jones’ blog, the archives from the Solar-Talk mailing list have been made available by Rodrigo Moraes.

From Rodrido’s post to the list:

The Solar-talk archives are now searchable: http://tipos.org/solartalk/

It is a very rudimentary mini-app using Solar & Zend_Search_Lucene for the indexing. Some features are still not implemented like pagination and exact phrase match. Messages will be indexed once a day via cron, starting from today at night. Currently it is indexed until last Friday, July 14.

Great to see a compination of the two frameworks working together as well - each has their strengths and examples of both are displayed here.

Continue Reading · Add comment

Using Method Call Overloading in PHP 4

This is part two of the series Overloading classes in PHP. In three tutorials this series teaches how to overload your classes in PHP 4 by using the overload PHP built-in function in conjunction with the implementation of the __set __get and __call methods and explores the native support of object overloading in PHP 5….

(Advertisement) Hit your SQL Server 2005 performance target Get the most from your SQL Server 2005 platform with Quest Software. Identify, rewrite & benchmark poor SQL. Isolate SQL Server stress factors. Discover, diagnose and resolve performance issues in real time. And forecast & trend storage requirements.

Continue Reading · Add comment

The OC Food Review Blog: Make your own geovisitor

The OC Food Review Blog has yet another cool little article (by Tawin Kiethanom) - this time, it’s a look at creating a “geovisitor“, a bit of tracking code/HTML that allows you to get the most info from your visitors.

The website uses an free external website called hostip.info to extract the location from the incoming ip address. The HTML code creates a small hyperlink image which directs the user to the main Geovisitor page displaying their geolocated hits on a google map. Now I know this isn’t an amazingly unique idea but I must admit it hasn’t be done with this kind of style before.

He walks through the steps:

  • parsing out the XML from the result call to hostip.info
  • setting up a database to record the information
  • displaying an image on the same page with a RewriteRule
  • integrating the information into a Google Map (via the API)

Sounds simple, right? Well, have no fear - there’s plenty of explaination the whole way through, so you won’t be at a loss.

Continue Reading · Add comment