Snippets tagged “https”
10 snippets use this tag.
- Can't connect to HTTPS site using cURL. Returns 0 length content instead. What can I do?PHP
There are several possible reasons why cURL is returning a 0 length response when trying to connect to an HTTPS site.
- CURL and HTTPS, "Cannot resolve host"PHP
It sounds like you are trying to use curl to make a request to an HTTPS url and are encountering an error that says "Cannot resolve host." This error can occur for a few reasons:
- How to get file_get_contents() to work with HTTPS?PHP
To get file_get_contents() to work with HTTPS, you may need to make sure that PHP has been compiled with the OpenSSL extension.
- How to send HTTPS posts using phpPHP
To send an HTTPS POST request using PHP, you can use the curl extension.
- Java HTTPS client certificate authenticationJava
To perform HTTPS client certificate authentication in Java, you can use the HttpsURLConnection class and the SSLSocketFactory class.
- PHP: HTTP or HTTPS?PHP
In PHP, you can use the $_SERVER['HTTPS'] variable to check whether the current page is being served over HTTPS.
- Python Requests throwing SSLErrorPython
Here's a code snippet that demonstrates how to use the Python requests library to make a GET request to a URL, while handling a possible SSLError:
- Setting up SSL on a local xampp/apache serverPHP
To set up SSL on a local XAMPP/Apache server, you will need to generate a self-signed certificate, configure the Apache server to use the certificate, and then access the server using https.
- Trusting all certificates using HttpClient over HTTPSJava
To trust all certificates when using the Apache HttpClient library to make HTTPS requests, you can create a custom X509TrustManager implementation that trusts all certificates and use it to create an SSLContext with a custom TrustStrategy.
- Use cURL with SNI (Server Name Indication)PHP
Server Name Indication (SNI) is an extension to the Transport Layer Security (TLS) protocol that allows a client to specify the hostname it is trying to connect to at the start of the handshaking process.