How to get data from a website that uses SSL using cURL and PHP?

后端 未结 2 1459
北荒
北荒 2021-01-28 06:38

I am trying to get some data from a website where you need to have a SSL certificate to be able to connect to it. I have found the following code :

// create curl         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-28 06:59

    can you try like this? echo $str = file_get_contents("https://jsonplaceholder.typicode.com/todos/1");

提交回复
热议问题