Monday, June 5th, 2006

WordPress and HTML_AJAX

Category: PHP, Programming

Troy Mcilvena has posted this new tutorial on the creation of WordPress plugins (specifically a stock quote lookup module) with the help of the HTML_AJAX PEAR package (PHP).

He jumps right into it, showing how to get the needed packages installed – HTML_AJAX (obviously), and the PEAR SOAP package as well. He gives the basic content for the WordPress plugin files, where to put them, and the plugin’s core function for the WordPress system to hook into.

More code follows, including the creation of the “model”, the part that actually does the work of fetching the stock quote information from Webservicex.net via a SOAP connection. The returned XML is then translated, via an XSL stylesheet, into something we can use. Finally, they integrate the plugin and the model, making it possible for the data to be pulled into the plugin easily, and provide the complete code for the plugin itself.

The end result is a plugin that allows you to query the web service anytime you want to get the latest updates.

Posted by Chris Cornutt at 12:21 pm
Comment here

+++--
3.7 rating from 36 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.