ParanoidFerret.com: Flex & PHP Tutorial - Transmitting data using JSON
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.
396172
Alexey Zakhlestin gave a talk for the PHPThinktank IRC channel recently on the topic of YAML, PHP, and some of the work that he's done combining the two.   It happened a bit of spontaneously, so noone was invited. It was my first try, to make introduction to yaml for php prgrammers, and if there is more interest I will give another talk which will cover more details, this time with proper scheduling :)   You can check out the log of the discussion for his entire talk (covering topics like what YAML is, where to get more information on it, some of its features, and a mention of the Syck library for parsing it).
685152
Joshua Eichorn has posted some slides that he presented at a local PHP User Group meeting just passed that serve as an introduction to PEAR.   I'm hoping to improve the slides a bit and give this presentation at lots of other places. If any PHP User groups on the west coast would like me to do a presentation about PEAR drop my a line.   To help further the cause of PEAR, he's also offering the slides in an archived file for presentation anywhere.
751529
Michael Kimsal has come up with the start of a series to introduce PHP developers to the world of Grails (the Java framework).   The comparisons I plan to make will be mostly to PHP, cause that's what I'm most familiar with, though there may be some other comparisons from time to time.  This is a work in progress, but I'd be very interested in feedback from anyone out there interested in this aea - Grails, Groovy, PHP, why another language/platform/framework, etc.   The first two installments have been posted - part one and part two - with an introduction to what Grails is and a brief dip into some "Hello world" sort of code to give you an idea of the structure.
611923
This week, Cal Evans is reporting live from this year's php/db|works conference in Toronto. Since today is "Tutorial Day", the schedule is a little lighter, and he makes to time to catch Rob Richards' talk on PHP and Advanced XML and Web Services.    Rob Richards is the author of Pro PHP XML and Web Services. He literally wrote the book on using PHP and XML together. At php|works, he is leading a tutorial on using XML in web services using the DOM extension.    If you ever get a chance to hear Rob do a presentation, let me warn you, it is not for the faint of heart. As I learned last night when I sat down with Rob to record an interview, Rob likes to speak on leading edge and advanced topics. This tutorial is an excellent example of that philosophy.    Cal talks more about the content of the talk - its simplicity despite the complex topic, how much info is jammed in, and the fact that it's not just one giant pitch for Rob's book.
633181
Gareth Heyes has a new post today talking about one of the vulnerable values in the $_SERVER superglobal - PHP_SELF.   I thought it might be a good idea to gather a few test cases demonstrating the problem. Why PHP allows these URL's is beyond me and it wouldn't take much work to filter out these malicious URL's in the PHP code.   He provides four test cases to show how simple it is to abuse - one using a HTTP header, another pushing XSS through, the third mentions search pages and the fourth a direct code injection.   You can download the code here.
463548
On the PHPClasses.org website there's a new entry covering, among other things, one handy feature PHP includes to let developers read and write their data more flexibly - streams.   This article explains what are stream handlers and how they simplify PHP developers lives by allowing PHP applications to easily read and write data from containers, like remote Web pages or e-mail messages, as if they were files. [...] The article also presents more examples of cool stream handlers classes submitted to the PHPClasses site by several authors.   He describes the abstraction that the streams interface allows, how they can make your life easier, a real-life example of streams in action (working with POP3) and some of the classes that have been contributed to PHPClasses.org that use them.
82198
Knut Urdalen shares a note about the latest issue of the International PHP Magazine - the December 2007 issue - that he has an article in.   The December issue of International PHP Magazine includes my latest article "Seamless AJAX with PRADO - An introduction to ActiveControls". In this article I discuss some AJAX design patterns and show you how to make use of them in AJAX enabled components that ships with the PRADO framework.   More information about this issue (and subscribing to the International PHP Magazine) can be found on this page of their site and details on the PRADO framework are over on the project's website.
473226
Damien Seguy has continued his series looking at PHP configurations around the web and is sharing the results in the form of two new reports over on Nexen.net.   I just published the second part of the serie about PHP configurations. This part focuses on three aspects of PHP: PHP extensions, PHP streams, and disabled functions.   You can find the statistics themselves here and the latest configuration statistics here. It's interesting to see the drop-off when it comes to the various modules that are installed ("php, ftp and http are the most common. Besides them, tough luck.") and to see the somewhat more gradual curve of which functions are disabled - with system() topping out the list (with good reason).
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.
757137
Gareth Heyes has posted another challenge to his blog - this time it involves using a regular expression to convert the inputted string into the output he's given.   After the success of my "a bit of fun" challenge, a few people asked for some more challenges. So I was answering a question on a mailing list that I'm a member of and I thought it would be a good topic for a little challenge and help sharpen everyone's regular expression skills.   This time, his challenge involves taking the input, rail start/end locations from an array and, via the PHP script given (no regular expression in it, of course) make the output, a sort of JSON formatted message. It's already been answered, but if you want to, try it yourself first then read the answer below the post.
743840
Chris Shiflett has posted his own recap of the (just passed) php|works conference up in Toronto over on his blog.   I've been traveling non-stop since php|works, so I haven't had a chance to reflect on the conference, what I learned, who I met, and things like that. (Zak has been doing a good job of this lately, and I'd like to follow his lead.) I've probably forgotten more than I remember, but this is my recap.   Included in the things he mentions are:  The people he was able to meet (like Joshua Eichorn and Sebastian Bergmann) The talks he gave ("Truth about XSS" and "Agile PHP Testing") His interview with Cal Evans of the Zend Developer Zone The PHP 5 Certification and Wez Furlong's "Not PDO" talk
582158
Michael Kimsal points out the posting of the latest part of his "Grails for PHP developers" series to his blog site - Part Five of the series.   I've put up the latest installment in my "Grails for PHP developers".  Rather than delve too much more in to Grails head on, I'm taking this installment (and at least the next one) to delve more in to the Groovy language itself.  Groovy offers similarities to PHP, but also many differences which can trip you up if you're not careful.  I'll try to lay those out as best I can in the next couple of installments.   This new part of the series goes back and puts the spotlight on GRoovy, the base of the Groovy/Grails combo. He talks about working with variables and arrays as containers for multiple pieces of data and some possible gotchas that could come up along the way.
611971
Although frankly I really didn't feel the need to read the entire thread, I can tell you that the posting to the PHP 3 mailing list is related to the Smarty Templating Engine back in the day. In fact, I believe this was the original spec Andrei proposed before Smarty even existed. Although I don't remember the exact e-mail, this posting reminded me that there was a point in time I thought exactly this way... quoting myself:
41064
Gerd Schauffelberger writes on the PHP-Tools Blog today about the contents of the latest issue from the German PHP Magazine, specifically an article covering the PEAR package HTML_AJAX.   This article's target is (1st) to give a brief introduction to AJAX and how things work from Javascript an PHP side in contrary. Also (2nd) I wanted to show that you actually don't have to muck around with a mess of Javascript (browser compatibility issues and such) because it's it is all done by the Joshua Eichorn's HTML_AJAX framework.    The article doesn't build up an entire application (as Gerd mentions) but it does provide you a good base to work from and gives you a good direction to head from to learn more about this powerful package.
71505
Latest PHPClasses.org Releases:CAPTCHA 2Get Futurist DatePictoru's GIF TextFormulariosIP_to_countryMsSql To XMLrschatCheck spamTSfloCrosswordPictoru's GIF TextMYSQLCLS_DBFile2XMLColor extractphpmmPHP Array to Javascript
466365
Cameron Olthuis wants to share the tools that he finds th emost useful with the entire web, so he's posted them here on his blog.   His list includes libraries from all different technologies, not just PHP. Several are Javascript-related, but it's always good to have a complete toolkit on hand when trying to tackle some of the more difficult things.   Included in his list are things like:  Moo.fx - a Javascript effects library Swat - an open source web application toolkit PEAR - the PHP package repository Mochikit - lightweight Javascript library    Be sure to check out the post and its comments for more great resources!