Giter Club home page Giter Club logo

Comments (7)

jeckman avatar jeckman commented on August 19, 2024

Notice what it says in the debug. If your server is not localhost (you're running the code on a machine different than the one running your web browser) AND your curl request goes via ipv4, this will fail.

from youtube-downloader.

ndm13 avatar ndm13 commented on August 19, 2024

How can this be fixed? I don't know about curl but know a decent amount of php.

from youtube-downloader.

jeckman avatar jeckman commented on August 19, 2024

If the server on which you are running the code supports ipv6, you should be able to force curl to use ipv6.

This would mean setting:
curl_setopt( $ch , CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);

Inside the curlGet($url) function in curl.php

However, my guess is that your server is falling back to ipv4 because it can't reach the youtube server over ipv6, in which case this script will not work for you - you can try the javascript in browser version I posted a link to in another thread.

Basically if you add that it may just fail with a different option

from youtube-downloader.

ndm13 avatar ndm13 commented on August 19, 2024

That explains it. I'm using an older server and it doesn't like ipv6. Where is this javascript version?

from youtube-downloader.

jeckman avatar jeckman commented on August 19, 2024

https://github.com/edse/keepvideos

from youtube-downloader.

ndm13 avatar ndm13 commented on August 19, 2024

Thanks a lot!

from youtube-downloader.

jeckman avatar jeckman commented on August 19, 2024

You're welcome. I also updated the readme and added the config to the curl.php to resolve only to ipv6 - it will still fail but the error message might be a bit cleaner.

I don't have an ipv4 only server to try it on. ;)

from youtube-downloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.