I have a service website that also offers an api for developers.
But my site users can not use the api, because the site is connected to Cloudflare!
for testing, I connected to my site via file_get_contents, but got an error
That means I connected mywebsite.com/test.php to mywebsite.com/api/v2 …
I got this error:
Warning: file_get_contents(): Peer certificate CN=`amazeservice.net' did not match expected CN=`mywebsite.com' in /home/mywebsite/public_html/test.php on line 3
Warning: file_get_contents(): Failed to enable crypto in /home/mywebsite/public_html/test.php on line 3
Warning: file_get_contents(https://mywebsite.com/api/v2): failed to open stream: operation failed in /home/mywebsite/public_html/test.php on line 3
Could you try connecting to your API via another programming language and post that error message here? Php error messages are generally unhelpful for determining and explaining the point of fault in a request.
My website is Linux and cpanel, it does not support any language other than php.
Until last week, this error did not exist, it suddenly occurred on all sites on the server.
The curl command also failed and gave this error.
[13-Mar-2022 06:01:20 UTC] PHP Warning: curl_setopt_array(): Array keys must be CURLOPT constants or equivalent integer values in /home/myebsite/public_html/index.php on line 311
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.