-
When I read the Google optimizing PHP article, I thought yikes this author must suffer from a case of the premature optimization... this thread confirms my suspicions. Note to Google: Please be careful with prescriptive performance advice!
- Tags:
- php
- performance
- premature
- optimization
-
Hidden Features of PHP? - Stack Overflow
A great list of 'hidden' PHP features.
- Tags:
- programming
- php
- features
- idioms
-
PHP CAPTCHA Library for reCAPTCHA
PHP Library for reCAPTCHA
-
HTTP Client Library for PHP As I mentioned in my last post, I’m currently spending a lot of time thinking about and coding PHP libraries for the various Open Stack protocols.... HTTP. We need good HTTP support in the Open Stack libraries to do basic things like fetching metadata documents, and sending OAuth and OpenID requests. Some things to think consider:
-
DiSo Project. Instead of continuing to concentrate on some of the higher level deliverables like WordPress plugins, I decided it was time to step back and evaluate where the development community (specifically the PHP development community) is with the Open Stack.
-
New Screencast about "OFace", an experiment in social identity faceting on top of FriendFeed. Check it out and give me feedback. I'll be looking for peeps as I get closer to having a working service. Although it isn't mentioned in the video, this is powered by a (half) built php app, a ubiquity script, and FriendFeed's backend.
-
How to setup php-atompub-server
I am slowly hacking away at my identity faceting service and wanted to play with exposing facet history with atompub. I found Jeroen Hoekx’s php-atompub-server. This post is how to setup an Atompub server using PHP5. This post assumes you are using (and are familiar with ) Apache2, PHP 5, and Linux. I will be doing this on an Ubuntu VM which I’ve hardcoded into my /etc/hosts file as ofaceatom.ubuntu. I’ll walk you through what I did to get the test app up and running, but you might want to read php atompub server’s wiki Overview and then HTTPServer for more background. Pick a place to install. I will refer to this as $DEV_PATH cd $DEV_PATH svn checkout http://php-atompub-server.googlecode.com/svn/trunk/ php-atompub-server-read-only On your development machine, map an apache2 VirtualHost’s DocumentRoot to $DEV_PATH/php-atompub-server-read-only Edit $DEV_PATH/php-atompub-server-read-only/app/start/start.php $base_uri = new URI(”http://ofaceatom.ubuntu/app”); Create a .htaccess file in $DEV_PATH/php-atompub-server-read-only/app/ RewriteEngine On RewriteRule ^(.+) start.php DirectoryIndex start.php chmod go+w $DEV_PATH/php-atompub-server-read-only/app The server will create ’store’, ‘lists’, and ‘cache’ directories under the app directory, but mkdir will fail in appfilestore.php if apache doesn’t have permission to write here… Make a request to http://ofaceatom.ubuntu/tools/ an ensure that you get a directory list of data1.xml manager postatom.html If you point your browser to http://ofaceatom.ubuntu/app/ you will see the output <service> − <workspace> <atom:title>PHP AtomPub Server</atom:title> − <collection href=”test/”> <atom:title>AtomPub Test: Test</atom:title> <accept>/</accept> </collection> − <collection href=”news/”> <atom:title>AtomPub Test: News</atom:title> </collection> − <collection href=”media/”> <atom:title>AtomPub Test: Media</atom:title> <accept>/</accept> </collection> </workspace> </service> or it may ask you to save a file, depending on your setup. (the mime-type is application/atomsvc+xml) Test Page http://ofaceatom.ubuntu/tools/postatom.html is an HTML based Atom client which you can use to test the server. Change the URI feild to your hostname. For me that’s http://ofaceatom.ubuntu/app/ Click Submit and you will see STATUS: 200 Ok Date: Sat, 24 Jan 2009 02:46:00 GMT Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch X-Powered-By: PHP/5.2.4-2ubuntu5.3 Cache-Control: must-revalidate Etag: “21a609367f0b4ee98bba15771419be4d;gzip” Content-Encoding: gzip Vary: Content-Encoding Content-Length: 254 Content-Type: application/atomsvc+xml <?xml version=”1.0″ encoding=”utf-8″?> <service xmlns=”http://www.w3.org/2007/app” xmlns:atom=”http://www.w3.org/2005/Atom” > <workspace> <atom:title>PHP AtomPub Server</atom:title> <collection href=”test/”> <atom:title>AtomPub Test: Test</atom:title> <accept>/</accept> </collection> <collection href=”news/”> <atom:title>AtomPub Test: News</atom:title> </collection> <collection href=”media/”> <atom:title>AtomPub Test: Media</atom:title> <accept>/</accept> </collection> </workspace> </service> Clicking the Clean button will clear the output. Notice that there is a “test” collection… lets look at it. Change the URI input to http://ofaceatom.ubuntu/app/test/ And press Submit We see an empty Atom feed. We’ve been using the GET method, let’s create an item. Change the METHOD input to POST and click submit. STATUS: 201 Created You’ll need to have a unique SLUG value for each post on the test collection. The item lives at http://ofaceatom.ubuntu/app/test/test.atomentry Using PUT on this url, you can change the contents of that item. Now you can go back to the atom feed at http://ofaceatom.ubuntu/app/test/ And your item is in the list. Once you create more than 10 items, this feed is paginated. You can now play around with news and media collections just like test. Note that news requires the http://htmlpurifier.org/ library to be installed as noted on the wiki at SanitizingInput. If you get tired of changing the URI, you can edit line 11 of $DEV_PATH/php-atompub-server-read-only/tools/postatom.html to change the prefilled value for the atom service document.getElementById(”uri”).value = “http://ofaceatom.ubuntu/app/”; All in all a very cool project from Jeroen. To learn more and play with exposing your data via atompub, next steps are to do some hacking, and read HowItWorks, ExtensionModel and then phpBBStore.
-
PHP and MySQL® Web Development, Fourth Edition
PHP book on Safari
- Tags:
- php
- webdev
- book
- toread
- laurathomson
-
API - sweetcron - Google Code - API Reference for Theme developers
The php API for customizing the view

