I know this was an old thread but I was playing with something similar.
I was able to set one up pretty quickly with the help from luke's post. I pasted the code below.
#!/usr/bin/env php
<?php
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/json'));
curl_setopt($c, CURLOPT_URL, 'http://pubapi.cryptsy.com/api.php?method=marketdata');
$data = curl_exec($c);
curl_close($c);
$obj = json_decode($data);
echo print_r($obj->{'return'}->{'markets'}->{'ANC'}->{'lasttradeprice'}."\n", true);
?>