westvovik
Новичок
Не могу понять в чем дело, до этого все работало
Пытаюсь забрать допустим картинку с сайта
$url = 'https://xxx.ru/img/no_user.jpg';
$timeout = 50;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1'); // mPDF 5.7.4
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOBODY, 0);
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , 1 );
curl_setopt ( $ch , CURLOPT_CONNECTTIMEOUT , $timeout );
$data = curl_exec($ch);
echo $data;
Выдает пустоту, а в браузере картинку открывает в логах вот что
Trying 213.134.xxx.xxx..."
* Connected to xxx.ru (213.134.xxx.xxx) port 443 (#0)"
ALPN, offering http/1.1"
* SSL connection using TLS1.0 / ECDHE_RSA_AES_256_CBC_SHA1"
server certificate verification failed. CAfile: none CRLfile: none"
* Closing connection 0"
На серваке установлен сертификат купленный RapidSSL
Пытаюсь забрать допустим картинку с сайта
$url = 'https://xxx.ru/img/no_user.jpg';
$timeout = 50;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1'); // mPDF 5.7.4
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOBODY, 0);
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , 1 );
curl_setopt ( $ch , CURLOPT_CONNECTTIMEOUT , $timeout );
$data = curl_exec($ch);
echo $data;
Выдает пустоту, а в браузере картинку открывает в логах вот что
Trying 213.134.xxx.xxx..."
* Connected to xxx.ru (213.134.xxx.xxx) port 443 (#0)"
ALPN, offering http/1.1"
* SSL connection using TLS1.0 / ECDHE_RSA_AES_256_CBC_SHA1"
server certificate verification failed. CAfile: none CRLfile: none"
* Closing connection 0"
На серваке установлен сертификат купленный RapidSSL