- var_dump: documentation ( source)
- json_decode: documentation ( source)
<?php
function _its_video_gallery_livestream_thumbnail($cid, $vid) {
$url = 'http://x'.$cid.'x.api.channel.livestream.com/2.0/thumbnail.json?id='.$vid;
// $response = drupal_http_request($url);
// $data = $response->data;
$data = '{"thumbnail":{"@url":"http:\/\/www.livestream.com\/filestore\/user-files\/chlukeestv\/2010\/01\/04\/92609a8d-afa6-4832-a8b2-ac4dc2925f4b_10.jpg"}}';
$decode = json_decode($data);
var_dump($decode['thumbnail']);
}
_its_video_gallery_livestream_thumbnail('abc','def');