PHPBuilder.com: AJAX and PHP Part 2 - XML Communication/Processing
604342
PHPBuilder.com has posted part two of their look at combining Ajax and PHP. They take things a step further than last time and look at the actual communication between the script and the server.   AJAX and PHP 5 both have powerful features for processing and using an XML document. XML is a method of formatting data often for communication purposes between different computer systems. In this article, we will show you how to access an XML document with AJAX!   They create a script that can load the XML information from a file and echo it back out to the waiting client script. They also include the other half - the client-side javascript that grabs the XML information, parses it, and pushed it into a javascript object for easy access.
53814
Cal Evans has posted his notes from the (just passed) Web Builder 2.0 Conference that happened over in Las Vegas. PHP had its presence there through Cal's "PHP Powers Mashups" talk and others like Chris Shiflett.   There was plenty to see and do at the conference besides PHP and Cal highlights just a few:  AJAX Optimization talks  An overview of some Flickr Stats Google's mashup offerings An introduction to  and some talk of benchmarking Ajax  Check out the full post though - it's jam-packed with links and some great event information.
742027
In the next edition of their IRC Talks series, the PHP Thinktank-ers has posted the logs of the latest discussion for last week - a look at Ajax.   Some of the topics that were mentioned in this week's talk include:  what Ajax is/who uses it javascript libraries that support it a look at some of the technology (XMLHttpRequest, responseXML, responseText) that make up an Ajax message.    Be sure to check out the other talks on their blog including a PHP-GTK talk one and a look at the SPL in PHP.
676917
On his Adobe blog, Charlie Key has a new post demonstrating how you can transmit data back and forth between a Flex application and PHP using JSON messages.   In almost every RIA data needAdobe Flex makes implementing this solution an easy task. The solution explained in this tutorial uses PHP for the server-side programming and sends the data using JSON (JavaScript Object Notation) encoding. By the end of the tutorial you will be sending simple objects along with arrays of objects from your PHP code to your Flex client.s to be transmitted from a server to the client. [...]    There's a list of things you'll need to get started, the files you'll need to work with in the tutorial, and the steps to follow to make things work together nicely. Plenty of PHP and Flex code is included.
690580
On the Dotvoid.com blog today, there's a new post that shares some handy code to parse out information from the incoming user agent string for the visitors for your site.   Recently I experimented a bit with an Apache log file analyzer written in PHP. It's not all that difficult were it not for trying to parse the browser, or user agent, string. [...] For my purposes I don't care much for the operating system details. This is the result so far. I'm still not very satisfied but I thought maybe other people might be interested and maybe help out.   He provides the code in the format of an encapsulated PHP function that returns the product they're using, the version number of the browser and other various comments.
758748
This week you'll learn how to construct a complete and working Ajax application. As with any Ajax application, it will make use of an HTML document, JavaScript routines, a server-side routine (in PHP) and a callback function to deal with the returned data. By Phil Ballard. 0806
640050
In this new blog post today, Evert Pot shares some thoughts on a custom solution he was looking to create as an alternative for PHP's serialize function.   I wanted to build this as a helper class for a draft-PHP-RPC server. The reason I needed a custom one was because I wanted to make sure I would be able to spit out PHP4-compatible serialized data, and in the future, when its ported to PHP6, also PHP5-compatible data.   He came across several issues in the development process including the slowness of his method compared to serialize() and a lack of a way to tell if two variables reference the same data. If you'd like to check out what he has so far, he's made the code available for download.
465600
Joshua Eichorn notes in a quick post that, due to a last minute change, he will be speaking at php/db|works this year.   He'll be giving two Ajax sessions:  Scaling with Ajax (Wednesday @ 10:15) Javascript Light and Sweet (Wednesday @ 14:45)    Check out the full listing schedule over on the php|architect site for complete details on the whos and whens of each day of the conference. And, of course, you can still sign up for the conference too!
714880
In a new tutorial over on PHPBuilder.com today, they demonstrate how to create and work with one of the most popular data exchange formats on the web today - RSS.   Recently I was looking for an RSS aggregator. I was having surprising difficulty finding one that did exactly what I wanted. [...] I began seriously considering writing my own. This month, I show you how to create a basic RSS reader yourself.   He gives a simple primer to what RSS is and what it looks like (explaining the XML spec) and includes an example of what a simple document looks like. He uses the older XML functionality in PHP (expat) to do the parsing and includes to code that he uses to get the job done.
428926
From UnixReview.com, there's a handy guide to functionality that PHP supports to help you get a handle on things like multiple socket requests - multi-tasking in PHP.    There's quite a bit more to tell, though, about PHP and concurrency. AJAX certainly boasts multi-tasking capabilities, and PHP supports AJAX about as well as the other Web languages support Ajax. An easy conclusion is that, by way of AJAX, therefore, PHP multi-tasks. However, common security, accessibility, and compatibility requirements prevent use of AJAX in many programs.   It's also true that PHP does not "support threads", as many observers put it. Even without AJAX, even without threads, there are still at least two distinct ways to achieve server-side multi-tasking with PHP. Let's look at how the language multi-tasks, and why:    They give an example of one way to fetch information from multiple sources normally (concurrent socket requests) to provide the "low level". They then show an example of how to use pcntl_fork, pcntl_exec, and streams support that can be built into PHP to create a three process function to grab the main pages (and status codes) from each of the sites in an array.
493955
Tony Bibbs takes a look at an increasingly popular bit of functionality in PHP5, the SOAP extension, and notes that it still has a "ways to go".   In my latest round of web services work in PHP5 I was creating a PHP5 client that interacts with our Java-based ERP. The client needs to be a combination of a couple of WSDL's into one, nice, compact and powerful client. It should be noted this client will be distributed via the State of Iowa PEAR channel so it will undoubted by used by other project in our organization and throughout state government so the result needs to have a lot more fit-and-finish than would be typical.   He mentions his expectations for PHP's usage of the protocol, including the automatic generation of variables/methods/etc to help the developer use the remote application easier.
507022
On the ParanoidFerret.com blog today, there's a new tutorial showing how to get the Adobe Flex technology to talk happily with PHP over a JSON interface. Their example is a simple form that, given a person's information, finds matches from a backend XML.   To make sure we don't get too stuck in a rut with our tutorial posts I decided to branch out a little bit and talk about Adobe Flex 2.0. I recently spent a lot of time figuring out how to do this. Basically what I am going to go over here is how to use php and json to send data to your flex application, and then how to use that data in Flex.   He includes an example of the app in action plus all of the PHP and Flex code you'll need to make it work on your system. Since Flex has built-in JSON functionality, it makes it simple to query the resource and pull back the information that matches.
365469
Ajax Magazine has posted a new interview with Joshua Eichorn, the author of the PEAR HTML_AJAX package about who he is, details on the package, and what's to come.    I have contacted Joshua Eichorn, author of HTML_AJAX for an interview and as promised here is the interview. I asked Joshua about AJAX, HTML_AJAX, his experience, projects, current status,future projects and much more.    The interviewer starts off with general questions - who is he, how did he get started in PHP - that sort of thing. There's a mention of the time that Joshua has worked on phpDocumentor as well as his involvement in a local user group. They move on to the harder questions, talking about "why PEAR?" and what's next for the package's development...
449459
DevShed continues their series looking at some of the fundamentals of working with PHP in this new tutorial posted today. It looks at one of the flow control statements the language has to offer and a very useful data structure - the switch statement and arrays.   In our last exciting adventure (back in early November), we braved crocodiles, ravenous editors, most of the PHP statements, and beginning loops. In this edition we'll cover the final statement, the Switch, and discuss arrays. So sit back, order your R2D2 robot to bring you a cold, frosty Jolt Cola, and let's get cracking.   They start with a simple example of a switch statement (to echo out strings) and follow it with a detailed description of the different sorts of arrays - numeric indexed, associative and multidimensional versions.
610422
For those that weren't able to make it to Adobe's webcast for combining Flex and PHP for web developers, the host Mike Potter has posted the slides for your review.   The session is targeted at PHP developers starting out with Flex.  I'll show examples of how to connect to a PHP datasource using three different methods - REST web service, JSON and AMFPHP.  I'll discuss the advantages and disadvantages to using each of them, and then show you how to extend your in browser application to the desktop using Adobe AIR.   You can find the slides here [pdf]. Also, if you want the full experience of the webcast and not just the slides, you can also sign up for the other session on July 17th.
487989
PHPBuilder.com has posted part one of a new series looking at using AJAX functionality on your site (along with PHP_ to create a simple form handling script.   So you're interested in AJAX? AJAX is a powerful addition to JavaScript for browser-to-server intercommunication. We will demonstrate a simple script that sends a GET or POST request to a form handling script on a server, then the server script will return a response to the browser XMLHttpRequest JavaScript object.   They start with a definition of what AJAX is and how it can be used before getting into the examples - the first of a simple text field in a form that sends the contents back to the server and the second to fetch dynamic image information from the server.
666559
This week we continue with our exploration of Ajax. Topics covered are sending a request using an IFrame, creating a hidden IFrame, creating a form, sending a request using a cookie and more. By Joshua Eichorn. 1016