Skip to content

Instantly share code, notes, and snippets.

@bagder
Last active July 26, 2023 14:33
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bagder/a88d3bedc8ecb69d19aeb542fa538e9b to your computer and use it in GitHub Desktop.
Save bagder/a88d3bedc8ecb69d19aeb542fa538e9b to your computer and use it in GitHub Desktop.
HTTP/3 with PHP/CURL
if (!defined('CURL_HTTP_VERSION_3')) {
define('CURL_HTTP_VERSION_3', 30);
}
$ch = curl_init("https://cloudflare-quic.com/");
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3);
curl_exec($ch);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment