embed($url); $this->title = $Media->title; $this->thumbnail = $Media->thumbnailUrl; $this->author = $Media->authorName; $this->width = $Media->width; $this->height = $Media->height; $this->description = $Media->description; $width_tmp = $Media->width; $height_tmp = $Media->height; //echo "SSDTUBE YT: ($url)" . $Media->url; //print_r($Media); // get video */ $status_url = "http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=B4CRkpBGQzU&format=json"; $temp = explode("?v=",$url); if ( strlen($temp[1])>5){ $status_url = "http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=$temp[1]&format=json"; $json_output = file_get_contents($status_url); $json = json_decode($json_output, true); $this->title = $json['title']; $this->thumbnail = $json['thumbnail_url']; //$this->author = $Media->authorName; $this->width = $Media->width; $this->height = $Media->height; $this->description = $Media->description; $width_tmp = $json['width']; $height_tmp = $json['height']; $video_title = $json['entry']['title']['$t']; {"version": "1.0", "width": 459, "author_url": "https:\/\/www.youtube.com\/user\/jzsdhk", "provider_name": "YouTube", "thumbnail_width": 480, "html": "\u003ciframe width=\"459\" height=\"344\" src=\"https:\/\/www.youtube.com\/embed\/B4CRkpBGQzU?feature=oembed\" frameborder=\"0\" allowfullscreen\u003e\u003c\/iframe\u003e", "type": "video", "thumbnail_height": 360, "provider_url": "https:\/\/www.youtube.com\/", "title": "Joan Osborne - One Of Us", "thumbnail_url": "https:\/\/i.ytimg.com\/vi\/B4CRkpBGQzU\/hqdefault.jpg", "author_name": "Jos\u00e9 Werbston", "height": 344} $player =<< END; } else { $player =<< END; } //$this->embed = $player; //$this->embed = '
'.$Media->html.'
'; $this->embed = '
'."".'
'; $this->youtube_embed = "https://www.youtube.com/embed/$temp[1]?feature=oembed&fmt=18"; $this->youtube_watch = "https://www.youtube.com/watch?v=$temp[1]"; } }