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(‘action’,’query’); $client->setParameterGet(‘prop’,’revisions’); $client->setParameterGet(‘rvprop’,’content’); $client->setParameterGet(‘format’,’xml’); $client->setParameterGet(‘titles’, $urlSlug); // Get the wiki page via a get request $result = $client->request(‘GET’); // Make sure actual data was returned. If not, Read more about Using Zend to retrive wikipedia api content[…]

JS logging

I’ve been doing a fair about of js development lately and console.log has been my friend. However, writing console.log() is a bit heavy. So instead I’ve been adding this to my files as  a quick way to log in javascipt. function log() { if (window.console && console.log) console.log(‘{product or sitename} ::  ‘ +,’ ‘)); Read more about JS logging[…]