Exemplo n.º 1
0
 public function get_data($url)
 {
     $jsonurl = str_ireplace("{rand}", rand(100, 999), $this->jsonurl);
     $idandswf = $this->getIdArr($url);
     $jsonurl = str_ireplace("{id}", $idandswf['id'], $jsonurl);
     $dat = CVideosHelper::getVideoInfo($jsonurl);
     $jsonobj = json_decode($dat);
     $this->id = $idandswf['id'];
     $this->swf = $idandswf['swf'];
     $this->thumbnail = $jsonobj->data[0]->logo;
     $this->duration = $jsonobj->data[0]->seconds;
     $this->title = $jsonobj->data[0]->title;
     $this->description = 'test';
 }