Asynchronous File Upload from

p. This weekend I found an interesting article over at on using AJAX and PHP to do asynchronous file uploads. The article is titled “PHP AJAX example: asynchronous file upload”: and it’s part of their growing collection of PHP tutorials. Let’s take a quick peek at it, shall we?

bq. Asynchronous file uploads is quote popular feature in modern AJAX web-applications. However standard AJAX classes (XmlHttpRequest) does not have capabilities to process or send files selected with “file dialog” (input type=”file”). This article contains example application (trivial file-sharing service, like rapidshare, megaupload or yousendit) which uses embedded frames (IFRAME) to upload file. While file is uploaded to hidden frame, user can still access web-page and fill “file description” field.

p. The article goes on to deliver what it promises. The first few paragraphs give you the basics of “WHY” and then the rest is just source code. This isn’t really a tutorial I’d recommend for those new to PHP or AJAX but for veteran programmers, it’s the kind of tutorial you like. A quick description of what they want to show you and then the code. The sample code is reasonably documented and easy to follow. All-in-all, this is a good one to spend an evening with.

p. =C=

p.s., if you like this tutorial, vote for it at by clicking the little icon below.

About Cal Evans

Many moons ago, at the tender age of 14, Cal touched his first computer. (We're using the term "computer" loosely here, it was a TRS-80 Model 1) Since then his life has never been the same. He graduated from TRS-80s to Commodores and eventually to IBM PC's. For the past 10 years Cal has worked with PHP and MySQL on Linux OSX, and when necessary, Windows. He has built on a variety of projects ranging in size from simple web pages to multi-million dollar web applications. When not banging his head on his monitor, attempting a blood sacrifice to get a particular piece of code working, he enjoys building and managing development teams using his widely imitated but never patented management style of "management by wandering around". Cal is happily married to wife 1.31, the lovely and talented Kathy. Together they have 2 kids who were both bright enough not to pursue a career in IT. Cal blogs at and is the founder and host of Nomad PHP