Displaying a remote SSL certificate details using CLI tools

You should be able to use OpenSSL for your purpose: echo | openssl s_client -showcerts -servername gnupg.org -connect gnupg.org:443 2>/dev/null | openssl x509 -inform pem -noout -text That command connects to the desired website and pipes the certificate in PEM format on to another openssl command that reads and parses the details. (Note that “redundant” … Read more

How to send a HTTP Post request using PHP Curl and WordPress

I managed to solve this by adding the following into my functions.php add_shortcode(‘my_shortode’, ‘my_function’); function my_function () { $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_PORT => “2222”, CURLOPT_URL => “http://11.111.11.111:2222/folder/query”, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => “”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => “POST”, CURLOPT_POSTFIELDS => “<root>\r\n <something1>username</something1>\r\n <something2>123456789</something2>\r\n <something3>Hello</something3>\r\n</root>\r\n”, CURLOPT_HTTPHEADER => … Read more

WordPress transient not working with WP Engine

So I don’t know why the return $cached_result; in the else, but if that’s intentional, then you should probably do: return json_decode( $cached_result, true ); Because you’re caching the response body (which is a JSON string) and you’re reading the non-cached result like so: $array = json_decode($result, true);. But if that return was a mistake, … Read more

cURL error for cron

This error is most often related to the server configuration! Contact your hosting company and ask the hosting support to check the following points: The server is running a recent version of PHP and the cURL library. Increase PHP Memory Limit settings. Ask your web host if there is some limitation with wp-cron, or if … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)