Using Zend to retrive wikipedia api content

function getWikipediaContent( \$wikiUrl )


// initialize HTTP client
\$client = new Zend_Http_Client();
// Set it for wikipedia
\$client->setUri( \$wikiUrl );
// Set url params for get request
\$client->setParameterGet('titles', \$urlSlug);
// Get the wiki page via a get request
\$result = \$client->request('GET');

// Make sure actual data was returned. If not, return false
if( \$result->isError() )
return false;

// Put response body in to variable
\$body = \$result->getBody();

// Transform string in to xml feed so it can be parsed.
\$wikiXml = new SimpleXMLElement( \$body );
// Get body and transform back to string.
return (string) \$wikiXml->query->pages->page->revisions->rev;