CURL and HTTPS, “Cannot resolve host”

前端 未结 11 1987
时光取名叫无心
时光取名叫无心 2020-11-28 08:25

I\'m trying to fetch the contents of a page using CURL. The page that is doing the fetching is https and the page it is trying to fetch is also https. I\'m getting an erro

11条回答
  •  天涯浪人
    2020-11-28 09:16

    If you do it on Windows XAMPP/WAMP it probaly won't work as in my case.

    I solved the problem setting up Laravel's Homestead/Vagrant solution to create my (Ubuntu) development environment - it has built-in: Nginx, PHP 5.6, PHP 7.3, PHP 7.2, PHP 7.1, MySQL, PostgreSQL, Redis, Memcached, Node... to name just a few.

    See here for info how to set up the environment - it's really worth the effort!

    Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine. No more worrying about messing up your operating system! Vagrant boxes are completely disposable. If something goes wrong, you can destroy and re-create the box in minutes!

    Then you can easily switch PHP versions or set up more virtual hosts, new databases just in seconds.

提交回复
热议问题