You are browsing the archive for 2009 February.

by webhank

Picture Rock Trail

10:23 pm in Outdoors by webhank

Did a bit of winter mountain biking today – since the littlest one could be here any moment, skiing is kind of out right now.  Paul and I rode Picture Rock Trail just outside of Lyons, and it was fantastic.  It was about 20 degrees when we left and there was about 3 inches of fresh snow on the ground.  I rode the El Mariachi (man i love that bike) and it did well – although the WTB Weirwolf tires didn’t have the best hookup – maybe a deeper lug if you’re an idiot like me and enjoy riding in the winter. icon smile Picture Rock Trail

Oskar Blues tasted wonderful when we were done.

by webhank

A couple of fitness sites

9:20 pm in Misc by webhank

I’ve kind of been a bit obsessed with these sites the past few weeks.

by webhank

Connecting to Magento via XML-RPC

1:42 pm in Web Development by webhank

I have been trying off and on for about a week to get a connection made to Magento’s API via a PHP script.

Magento gives the following code snippet on their site, but I could not get it to work – souring the message boards didn’t really help either.  I am not sure if something was off with my installation instance or what.

  1. $client = new Zend_XmlRpc_Client(‘http://youmagentohost/api/xmlrpc/’);
  2. // If somestuff requires api authentification,
  3. // we should get session token
  4. $session = $client->call(‘login’, array(‘apiUser’, ‘apiKey’));
  5. $client->call(‘call’, array($session, ‘somestuff.method’, array(‘arg1′, ‘arg2′, ‘arg3′)));
  6. $client->call(‘call’, array($session, ‘somestuff.method’, ‘arg1′));
  7. $client->call(‘call’, array($session, ‘somestuff.method’));
  8. $client->call(‘multiCall’, array($session,
  9. array(
  10. array(‘somestuff.method’, ‘arg1′),
  11. array(‘somestuff.method’, array(‘arg1′, ‘arg2′)),
  12. array(‘somestuff.method’)
  13. )
  14. ));
  15. // If you don’t need the session anymore
  16. $client->call(‘endSession’, array($session));

After a bunch of trial and error – scouring the web etc – i was finally able to make a connection with the following script

<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
define("XMLRPC_DEBUG", 1);

require_once('../app/Mage.php');
$client = new Zend_XmlRpc_Client('http://www.domain.com/api/xmlrpc');

// If somestuff requires api authentification, we should get session token
$session = $client->call('login', array('user', 'key'));

echo "<pre>";
print_r($session);
echo "</pre>";

// If you don't need the session anymore
$client->call('endSession', array($session));
?>

one strange thing to note is the path to the API – with a trailing slash, i could not get this to work…’

I hope that this helps someone else out.

by webhank

Hut Trip

4:47 pm in Outdoors by webhank

for a few months now i’ve wanted to ski or snow shoe back into the Auresta or Ginn Mountain hut located about 4.5 miles east of the Eldora cross country trails.  with kelly in town, it seemed like the perfect excuse.  the avalanche danger wasn’t quite as low as i’d like but we figured below treeline we should be ok.  the hike in was pretty mellow, although in typical fashion, Kelly and i waited to leave the parking lot until 3:45 in the afternoon so we hiked the last bit in the dark which made finding the hut a little bit more of an adventure.  much to our surprise when we got there we were the only ones – it made for a fun evening of just hanging out.  i would definitely recommend this trip to anyone who likes winter camping (although the stove in the hut keeps it a fairly nice temperature)

Some things I learned:

  1. If you’re going to a hut bring a small lantern or more candles (nice to leave some behind)
  2. 1 beer packed in is not enough – even if it is a wonderful Ten Fiddy
  3. Having the place to yourself RULES
  4. Warmed Pro Bars make an excellent breakfast

I got GPS coordinates that i will post – just need to retrieve them.

photos below: