View Single Post
Old 03-06-2011, 12:08 AM   PM User | #18
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
YouTube recently made some changes to the front end of their web site. As a result, a very minor tweak to my class code is required to keep it working properly.

The following code in the SetFlvUrl() method in YouTubeToMp3Converter.class.php:

PHP Code:
        private function SetFlvUrl($file_contents)
        {
            
$vidUrl '';
            if (
eregi('fmt_url_map',$file_contents))
            {
                
$vidUrl end(explode('&fmt_url_map=',$file_contents));
                
$vidUrl current(explode('&',$vidUrl));
                
$vidUrl current(explode('%2C',$vidUrl));
                
$vidUrl urldecode(end(explode('%7C',$vidUrl)));
            }
            
$this->_flvUrl $vidUrl;
        } 
...needs to change like so:

PHP Code:
        private function SetFlvUrl($file_contents)
        {
            
$vidUrl '';
            if (
eregi('fmt_url_map',$file_contents))
            {
                
$vidUrl end(explode('fmt_url_map=',$file_contents));
                
$vidUrl current(explode('&',$vidUrl));
                
$vidUrl current(explode('%2C',$vidUrl));
                
$vidUrl urldecode(end(explode('%7C',$vidUrl)));
            }
            
$this->_flvUrl $vidUrl;
        } 
After doing that, everything should work as it has before! (Please notify me if you experience otherwise.)
Attached Files
File Type: zip 3-5-11.zip (2.8 KB, 763 views)
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Web Conversion Software on Facebook !! :)

Last edited by chump2877; 03-06-2011 at 12:31 AM..
chump2877 is offline   Reply With Quote