Why does cURL return an empty string?

前端 未结 4 662
面向向阳花
面向向阳花 2020-12-20 11:36

I\'m having a problem with PHP\'s cURL returning an empty string with some URL\'s. I\'m trying to parse the OG metadata of different webpages and it works with all website

4条回答
  •  佛祖请我去吃肉
    2020-12-20 12:11

    This is what did it for me. It was looking for SSL verificaiton, which I happened to not need in this specific case.

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
    

提交回复
热议问题