Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 39 of 85 FirstFirst ... 29373839404149 ... LastLast
Results 571 to 585 of 1275
Like Tree8Likes

Thread: YouTube-to-MP3 conversion - PHP class and script

  1. #571
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    Youtube changed the way the video file URLs are displayed in the source code.

    For those of you with the free version, do me a favor and test this new code out in the PHP converter class (this replaces the current SetFlvUrls method):

    PHP Code:
            private function SetFlvUrls($file_contents)
            {
                
    $vidUrls = array();
                
    $vidSrcTypes $this->GetVidSrcTypes();
                if (
    preg_match('/(yt\.playerConfig =)([^\r\n]+)/'$file_contents$matches) == 1)
                {
                    
    $jsonObj json_decode(trim($matches[2], ';'));
                    if (isset(
    $jsonObj->args->url_encoded_fmt_stream_map))
                    {
                        
    $urls urldecode(urldecode($jsonObj->args->url_encoded_fmt_stream_map));
                        
    //die($urls);
                        
    if (preg_match('/^((.+?)(=))/'$urls$matches) == 1)
                        {
                            
    $urlsArr preg_split('/,'.preg_quote($matches[0], '/').'/'$urls, -1PREG_SPLIT_NO_EMPTY);
                            foreach (
    $urlsArr as $url)
                            {
                                if (
    $matches[0] != 'url=')
                                {
                                    
    $url = ($url != $urlsArr[0]) ? $matches[0].$url $url;
                                    
    $urlBase preg_replace('/(.+?)(url=)(.+?)(\?)(.+)/'"$3$4"$url);
                                    
    $urlParams preg_replace('/(.+?)(url=)(.+?)(\?)(.+)/'"$1$5"$url);
                                    
    $url $urlBase "&" $urlParams;
                                }
                                else
                                {
                                    
    $url preg_replace('/^(url=)/'""$url);
                                }
                                
    $url preg_replace('/(.*)(itag=\d+&)(.*?)/''$1$3'$url1);
                                if (
    preg_match('/quality=small/',$url) != 1)
                                {
                                    
    $url preg_replace('/sig=/'"signature="$url);
                                    
    $url trim($url',');
                                    
    $url .= '&title=' urlencode($this->ExtractSongTrackName($file_contents$vidSrcTypes[0]));
                                    
    $url preg_replace_callback('/(&type=)(.+?)(&)/', function($match){return $match[1].urlencode($match[2]).$match[3];}, $url);
                                    
    $vidUrls[] = $url;
                                }
                            }
                            
    $vidUrls array_reverse($vidUrls);
                            
    //die(print_r($vidUrls));
                        
    }
                    }
                }
                
    $this->_flvUrls $vidUrls;
            } 
    The same basic logic should be applicable to the paid-for version as well...but I have yet to work on the code for that version...don't worry, It's coming soon!

    For now, please let me know if the above code works, and thanks again for your continued patience.
    Last edited by chump2877; 12-19-2012 at 05:00 PM.
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  2. #572
    New Coder
    Join Date
    Jun 2012
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 Posts
    yup working

  3. #573
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    The new (updated and hopefully stable) distribution of files is located at the bottom of this post.

    PLEASE SEE THIS POST FOR IMPORTANT INFO REGARDING THE USE AND INSTALLATION OF THIS SCRIPT.

    DO NOT USE THE ZIP DISTRIBUTION LOCATED AT THE ABOVE LINKED PAGE. USE ONLY THE ZIP FILE ATTACHED TO THE BOTTOM OF THIS POST.
    New in this release:

    1) YouTube changed the format of video file URLs in the video page source code. This fix addresses this change.

    I will soon be updating the paid-for version of the app as well, and I will email an updated (free) copy to all those who have already purchased the script. (Updates will be sent to your Tradebit email addresses only.)

    As always, please let me know if you have any questions/concerns regarding the above and/or the code.
    Attached Files Attached Files
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  4. #574
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    Hello everyone,

    As promised, I have just finished updating the paid-for version of my software. New in this version:

    1) YouTube changed the format of video file URLs in the video page source code. This fix addresses this change.

    All previous customers who have purchased the paid-for version of my app are receiving this new, updated version via the e-mail addresses that you provided at Tradebit.com.

    Please report any issues with either the paid-for version or the free version in this forum thread.

    Thanks!
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  5. #575
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have paid version of your script. Can you tell me what exactly should I change because I have custom design and some custom code in those files?

    Thanks.

  6. #576
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    Hello everyone,

    As promised, I have just finished updating the paid-for version of my software. New in this version:

    1) YouTube changed the format of video file URLs in the video page source code. This fix addresses this change.

    All previous customers who have purchased the paid-for version of my app are receiving this new, updated version via the e-mail addresses that you provided at Tradebit.com.

    Please report any issues with either the paid-for version or the free version in this forum thread.

    Thanks!

    Hello Randall,

    I have paid version of your script as well. Can you please tell us what exact code needs to be changed because I have custom designed site and I dont want to mess up everything..

    kind regards.

    Jay

    Thanks.

  7. #577
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    To those of you that may have "customized" the code in the PHP converter class (regardless of which version of my code you're using):

    The point of putting all of the functionality related to video conversion into a PHP class is to take advantage of one of the fundamental advantages of an object-oriented programming (OOP) design: code abstraction. So you put all of your fundamental logic in a "base" PHP class, and then any customization of those classes can be achieved in inherited classes (via overriding class members). Subsequently, the base class doesn't need to be edited.

    In the context of my code, the base PHP class is YouTubeToMp3Converter.class.php or VideoConverter.class.php (depending on what version you have). In relation to the recent fix, if you need to customize this class, you can extend it with your own class that overrides the SetFlvUrls() or SetVidSourceUrls() methods (again, depending on what version you have). And you don't have to edit the base class.

    The moral of the story here is that you can customize my code without editing the core class code. And if you edit the core class code, then you make it harder for yourself to embrace newer versions of the software.

    Regarding the recent fix, the only code that changes is in the SetFlvUrls() or SetVidSourceUrls() methods. The sole purpose of these methods is to retrieve an array of video URLs that can be used for conversion. So forgive me if I am having a hard time understanding why you would want to "customize" that functionality? And if you did need to customize something there, please don't change the code directly in the conversion class. Extend the class with your own class and make your changes in your custom class.

    All of this taken into consideration, if you need any further help (from me) applying the fix to your custom/modified code, then I will have to charge you for the work and time spent.
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  8. #578
    New Coder
    Join Date
    Sep 2012
    Location
    Germany
    Posts
    41
    Thanks
    11
    Thanked 2 Times in 2 Posts
    Which files need to be changed in the paid version?

  9. #579
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by Luckyplaya View Post
    Which files need to be changed in the paid version?
    the base PHP class is YouTubeToMp3Converter.class.php or VideoConverter.class.php
    the only code that changes is in the SetFlvUrls() or SetVidSourceUrls() methods
    SetVidSourceUrls() method in VideoConverter.class.php. That is the only code to change in paid-for version.
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  10. Users who have thanked chump2877 for this post:

    Luckyplaya (12-28-2012)

  11. #580
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by OujdaCoder View Post
    hi bro i need VideoConverter.class.php update Please
    Please send me your Tradebit.com email address -- the one you supplied when purchasing my software. Then I will send you the update. FYI - You should have already been emailed this update.
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  12. #581
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by OujdaCoder View Post
    can You Give Me The Link Of Product and How a can Pay
    http://www.codingforums.com/showpost...&postcount=321

    Payment by PayPal or credit card via Tradebit.com
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  13. #582
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by OujdaCoder View Post
    a Payed Bro send Me the Update File at
    elodie.verborg@hotmail.fr
    You purchased the software, so you now have the most updated version.

    bro all can You add Xvideos and tube8 and xhamster
    This may be a mistake on my part, but I'm going to assume that this is a serious question. You can add additional video hosting sites to the software with a little customization of the code.

    If the mentioned sites have APIs for accessing their video content, then that would be ideal. Otherwise, you may have to scrape the HTML source code of their pages to retrieve video file URLs.
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  14. #583
    New Coder
    Join Date
    Jun 2012
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hey, been having trouble downloading videos again is it just my side or did youtube change stuff up again?

  15. #584
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    19
    Thanked 157 Times in 148 Posts
    Quote Originally Posted by bbrog View Post
    Hey, been having trouble downloading videos again is it just my side or did youtube change stuff up again?
    Still working for me...Can you provide URLs of specific videos?
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !! ♪♪

  16. #585
    New Coder
    Join Date
    Jun 2012
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi, been mostly getting problems with http://www.youtube.com/watch?v=MNvvzOpgOdo from this artist and this song.


 
Page 39 of 85 FirstFirst ... 29373839404149 ... LastLast

LinkBacks (?)

  1. 08-24-2014, 04:09 AM
  2. 07-21-2014, 05:32 PM
  3. 07-12-2014, 05:59 PM
  4. 06-26-2014, 03:39 PM
  5. 05-31-2014, 09:13 PM
  6. 04-24-2014, 07:53 PM
  7. 04-19-2014, 10:22 AM
  8. 04-04-2014, 08:33 PM
  9. 04-04-2014, 01:58 AM
  10. 03-28-2014, 06:03 AM
  11. 03-20-2014, 06:11 PM
  12. 03-16-2014, 01:22 AM
  13. 03-08-2014, 04:56 PM
  14. 03-07-2014, 06:21 PM
  15. 03-01-2014, 12:48 PM
  16. 02-22-2014, 08:40 PM
  17. 02-22-2014, 12:02 AM
  18. 02-21-2014, 08:15 PM
  19. 02-21-2014, 12:00 AM
  20. 02-20-2014, 08:37 PM
  21. 02-20-2014, 06:53 PM
  22. 02-20-2014, 03:21 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •