CURL call in PHP 7.4

This is a working CURL tested with PHP 7.4:

SSL verification is off, because it is curling an intranet server with no valid SSL certificate

$post = [
    'band' => 'Abba',
    'country' => 'Sweden'

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
Last update: Tue, 13 Sep 2022 14:32:15