A
A
alexdora2016-10-30 23:31:10
PHP
alexdora, 2016-10-30 23:31:10

PHP and Curl stopped displaying SSL correctly?

The meaning is simple:

curl_setopt($ch, CURLOPT_URL, $this->apiurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//curl_setopt($ch, CURLOPT_HEADER, true); 
//curl_setopt($ch, CURLOPT_CERTINFO, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->header);
curl_setopt($ch, CURLOPT_TIMEOUT, '60');

This code worked correctly and did not change. Now, for some reason, kryakozyabra comes. Connection protocol SSL 443
Kryakozyabra is in the response, not in the header. All right with your head!
If taken from the command line, create a request:
curl -H "Content-Type: application/json" -X POST -d '{"*":false,"*":"*","cookie":"*"}' https: //..
Then everything comes without kryakozyabr. PHP is installed together with the Vesta package, perhaps the certificate has changed and the old one has remained in some kind of cache (how to fix it?) or something like that. How to fix all this? I don't want to run curl through php system to get data.
ADD (header in)
HTTP/1.1 200 OK
Cache-Control: max-age=0, s-max-age=0, no-cache, no-store, private
Content-Encoding: gzip
Content-Type: application/json
Date: Sun, 30 Oct 2016 13:04:17 GMT
Expires: Sun, 30 Oct 2016 13:04:17 GMT
Last-Modified: Sun, 30 Oct 2016 13:04:17 GMT
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; preload
Vary: Accept-Encoding
Content-Length: 27
Connection: keep-alive

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2016-10-30
@alexdora

From the obvious, this is what comes to mind:
curl_setopt($ch, CURLOPT_ENCODING, "gzip");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question