Backup your Google Docs with PHP


Today I was looking for a way to backup my Google Documents, not just having an offline copy, and after few googling (in my reader also) I found the solution in a PHP script that Ilia published about one month ago under a BSD license. From the blog post :
It’s “a small (120 lines) PHP script that will retrieve all your Google documents and save them to a local directory, in the event the document was created/updated in the last 24 hours, thus ensuring snapshot support. Each file name is prefixed with Ymd (Year,month,day) prefix to ensure name uniqueness and provides an easy way to spot similar files or files that were created/updated on the same day.”
Only cURL and Simplexml extensions are required, which most PHP 5.0+ installs should have. The latest update allow to save each day backup in a separate directory in addition to Zip compression if the extension is loaded. Source code available at