rendered paste body<? if( !function_exists( 'include_conditional' ) ) { include( 'includes.php' ); } class cYoutubeVideo { var $rawPageData; var $jsClass; function cYoutubeVideo( $video_url ) { $this->rawPageData = getUrlData( $video_url ); $this->GrabJavascriptData(); } function GrabJavascriptData() { if( preg_match( '/var swfArgs = (.*);/', $this->rawPageData, $matches ) ) { $this->jsClass = json_decode( $matches[1] ); } } function GetVideoFLV( ) { return 'http://youtube.com/get_video?video_id='.$this->jsClass->video_id.'&t='.$this->jsClass->t; } //additional functions would go here }?>