lime icon

Phosphorus and Lime

A Developer's Broadsheet

This blog has been deprecated. Please visit my new blog at klenwell.com/press.
PHP: Greqo Google Data API
A couple weeks ago, Google announced the release of a new Blogger Data API for PHP: Ngeblog. Ngeblog uses the Zend Framework's HTTP Client to authorize Google accounts -- and therein lies its one fatal shortcoming, at least for me. The Zend Framework requires PHP 5 -- and most my hosts are still on PHP 4.4.

So I've developed an alternative that uses the PEAR HTTP Client and Magpie XML classes. It's called Greqo (Google REQuest Object -- though it's not really an object-oriented architecture.) I've created a Google Project for it and uploaded it there. Right now, it can authenticate a Google account (using the ClientLogin interface), retrieve a Blogger feed, and post a new entry to a Blogger blog. I'll add functions to edit and delete posts as I have time.

It's simple to load. Just start a session and call the greqo_driver. An example:

<?php

// *** Load Files
session_start();
$_parent_dir = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR;
require_once($_parent_dir . 'greqo_driver.inc.php');

?>


A full demo is available in the Google Code repository:

http://greqo.googlecode.com/svn/trunk/test/basic_get_control.php