Nepali Reporter | Online Tv - Nepali Reporter
url); $aux2 = explode("&",$aux[1]); foreach($aux2 as $campo => $valor) { $aux3 = explode("=",$valor); if($aux3[0] == 'v') $video = $aux3[1]; } return $this->id = $video; } public function url2id_($url) { $aux = explode("?",$url); $aux2 = explode("&",$aux[1]); foreach($aux2 as $campo => $valor) { $aux3 = explode("=",$valor); if($aux3[0] == 'v') $video = $aux3[1]; } return $this->id = $video; } public function thumb_url($tamanho=NULL) { $tamanho = $tamanho == "maior"?"hq":""; $this->url2id(); return 'http://i1.ytimg.com/vi/'.$this->id.'/'.$tamanho.'default.jpg'; } public function thumb($tamanho=NULL) { $tamanho = $tamanho == "maior"?"hq":""; $this->url2id(); return ''; } public function info() { $feedURL = 'http://gdata.youtube.com/feeds/base/videos?q='.$this->id.'&client=ytapi-youtube-search&v=2'; $sxml = simplexml_load_file($feedURL); foreach ($sxml->entry as $entry) { $details = $entry->content; $info["titulo"] = $entry->title; } $details_notags = strip_tags($details); $texto = explode("From",$details_notags); $info["descricao"] = $texto[0]; $aux = explode("Views:",$texto[1]); $aux2 = explode(" ",$aux[1]); $info["views"] = $aux2[0]; $aux = explode("Time:",$texto[1]); $aux2 = explode("More",$aux[1]); $info["tempo"] = $aux2[0]; $imgs = strip_tags($details,''); $aux = explode("",$aux[4]); array_pop($aux); $aux3 = $aux2[0].'gif">'; $aux[] = $aux3; $imagens = ''; foreach($aux as $campo => $valor) { $imagens .= 'entry as $entry) { $details = $entry->content; $info[$i]["titulo"] = $entry->title; $aux = explode($info[$i]["titulo"],$details); $aux2 = explode("'); $aux = explode("",$aux[4]); array_pop($aux); $aux3 = $aux2[0].'gif">'; $aux[] = $aux3; $imagens = ''; foreach($aux as $campo => $valor) { $imagens .= 'url2id(); print ''; } } ?>